Module: MongoMapper::RailsCompatibility::EmbeddedDocument

Defined in:
lib/mongo_mapper/rails_compatibility/embedded_document.rb

Defined Under Namespace

Modules: ClassMethods

Class Method Summary collapse

Class Method Details

.included(model) ⇒ Object



4
5
6
7
8
9
10
11
12
13
14
# File 'lib/mongo_mapper/rails_compatibility/embedded_document.rb', line 4

def self.included(model)
  model.class_eval do
    extend ClassMethods
    
    alias_method :new_record?, :new?
  end

  class << model
    alias has_many many
  end
end