…tected This patch requires ActiveModel edge, revision 4b66aab0 or later.
- When the Criteria object delegates to the model, it pushes the current criteria on the stack so that all/where/etc. are properly scoped within the delegated method. - Refactor Mongoid::Scope and Mongoid::NamedScope to respect the criteria scope stacks.
- rake db:create_indexes now works properly. The descendants and ever so confusing decendents methods now get called at the appropriate time and subclasses will properly get their indexes as well. - Mongoid will now preload all models properly through the config.to_prepare option in another initializer. This allowed all the models to get loaded when the environment is loaded. This helped solve the indexing and subclass querying issue. - Note that there is a bug with the current rails console, it performed a second reload which caused issues around this area and was subsequently removed by DHH It will be present in the RC release - so just ignore console for now.
…rents just like ReferencesMany does.