lib/mongo_mapper/plugins/descendants.rb in mongo_mapper-0.7.3 vs lib/mongo_mapper/plugins/descendants.rb in mongo_mapper-0.7.4
- old
+ new
@@ -1,15 +1,15 @@
module MongoMapper
module Plugins
module Descendants
module ClassMethods
def inherited(descendant)
- (@descendants ||= []) << descendant
+ descendants << descendant
super
end
def descendants
- @descendants
+ @descendants ||= []
end
end
end
end
end
\ No newline at end of file