Created
December 26, 2012 06:19
-
-
Save anonymous/4378339 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: UTF-8 | |
module MongoMapper | |
module Document | |
extend Support::DescendantAppends | |
def self.included(model) | |
model.class_eval do | |
extend Plugins | |
plugin Plugins::Document | |
plugin Plugins::Querying # for now needs to be before associations (save_to_collection) | |
plugin Plugins::Associations | |
plugin Plugins::Caching | |
plugin Plugins::Clone | |
plugin Plugins::Descendants | |
plugin Plugins::DynamicQuerying | |
plugin Plugins::Equality | |
plugin Plugins::Inspect | |
plugin Plugins::Indexes | |
plugin Plugins::Keys | |
plugin Plugins::Dirty # for now dirty needs to be after keys | |
plugin Plugins::Logger | |
plugin Plugins::Modifiers | |
plugin Plugins::Pagination | |
plugin Plugins::Persistence | |
plugin Plugins::Accessible | |
plugin Plugins::Protected | |
plugin Plugins::Rails | |
plugin Plugins::Safe # needs to be after querying (save_to_collection) | |
plugin Plugins::Sci | |
plugin Plugins::Scopes | |
plugin Plugins::Serialization | |
plugin Plugins::Timestamps | |
plugin Plugins::Userstamps | |
plugin Plugins::Validations | |
plugin Plugins::Callbacks # for now callbacks needs to be after validations | |
end | |
super | |
end | |
end # Document | |
end # MongoMapper |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment