Sha256: 84cbca09985dc5b299d98bbe7755624162027eb5a724a8c0de45f32da6511e85
Contents?: true
Size: 363 Bytes
Versions: 4
Compression:
Stored size: 363 Bytes
Contents
#class Spree::Taxon Taxon.class_eval do def is_category(root_path) if self.parent_id.nil? return root_path[1..-1] end root_path = "/#{self.id}" + root_path Taxon.find(self.parent_id).is_category(root_path) end def has_children? unless self.children.blank? return true else return false end end end
Version data entries
4 entries across 4 versions & 1 rubygems