lib/customize/inherited.rb in customize-0.0.2 vs lib/customize/inherited.rb in customize-0.0.3

- old
+ new

@@ -13,9 +13,12 @@ } end module ClassMethods + def root + joins(:inherit_node).where("parent_id is null") + end end def inherit parent raise 'should be save first' if self.new_record? raise 'should be same class' if self.class != parent.class