Module: MongoModel::ActiveModelCompatibility
- Extended by:
- ActiveSupport::Concern
- Includes:
- ActiveModel::Conversion
- Included in:
- EmbeddedDocument
- Defined in:
- lib/mongomodel/concerns/activemodel.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
Instance Method Details
#persisted? ⇒ Boolean
7 8 9 |
# File 'lib/mongomodel/concerns/activemodel.rb', line 7 def persisted? !new_record? end |
#to_key ⇒ Object
11 12 13 |
# File 'lib/mongomodel/concerns/activemodel.rb', line 11 def to_key persisted? ? super : nil end |