lib/mongo_mapper/plugins/descendants.rb in mongo_mapper-unstable-2010.3.8 vs lib/mongo_mapper/plugins/descendants.rb in mongo_mapper-unstable-2010.06.23
- old
+ new
@@ -1,15 +1,16 @@
+# encoding: UTF-8
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