mongoid/mongoid — pull request #2456 by kostyantyn (2012-10-09 20:34:53+00:00)
Title: Reset descendants' cache when new one is created

If ._types method had been called before declaration
the subclass, Factory.build method will not be able
to create object of its subclass.