Module: MongoMapper::Document

Extended by:
Support::DescendantAppends
Defined in:
lib/mongo_mapper/document.rb

Class Method Summary collapse

Methods included from Support::DescendantAppends

append_extensions, append_inclusions, descendants, extra_extensions, extra_inclusions, included

Class Method Details

.included(model) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# File 'lib/mongo_mapper/document.rb', line 6

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::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::Protected
    plugin Plugins::Rails
    plugin Plugins::Sci
    plugin Plugins::Serialization
    plugin Plugins::Timestamps
    plugin Plugins::Userstamps
    plugin Plugins::Validations
    plugin Plugins::Callbacks # for now callbacks needs to be after validations
    plugin Plugins::QueryLogger

  end
  super
end