Module: MongoMapper::RailsCompatibility::Document

Defined in:
lib/mongomapper/rails_compatibility/document.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.included(model) ⇒ Object



4
5
6
7
8
# File 'lib/mongomapper/rails_compatibility/document.rb', line 4

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

Instance Method Details

#to_paramObject



10
11
12
# File 'lib/mongomapper/rails_compatibility/document.rb', line 10

def to_param
  id
end