Module: Mongo::Model::Rails
- Defined in:
- lib/mongo/model/integration/rails.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#new_record? ⇒ Boolean
23 |
# File 'lib/mongo/model/integration/rails.rb', line 23 def new_record?; new? end |
#persisted? ⇒ Boolean
17 |
# File 'lib/mongo/model/integration/rails.rb', line 17 def persisted?; _saved end |
#to_key ⇒ Object
19 20 21 |
# File 'lib/mongo/model/integration/rails.rb', line 19 def to_key persisted? ? [id] : nil end |
#to_model ⇒ Object
15 |
# File 'lib/mongo/model/integration/rails.rb', line 15 def to_model; self end |