Module: MongoMapper::EmbeddedDocument

Defined in:
lib/mongo_mapper/embedded_document.rb

Defined Under Namespace

Modules: ClassMethods, InstanceMethods

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/mongo_mapper/embedded_document.rb', line 5

def self.included(model)
  model.class_eval do
    extend ClassMethods
    include InstanceMethods

    extend Associations::ClassMethods
    include Associations::InstanceMethods

    include RailsCompatibility::EmbeddedDocument
    include Validatable
    include Serialization

    extend Validations::Macros

    key :_id, String
    attr_accessor :_root_document
  end
end