Module: Her::Model::ORM::PersistanceMethods
- Extended by:
- ActiveSupport::Concern
- Included in:
- Her::Model::ORM
- Defined in:
- lib/her/model/orm/persistance_methods.rb
Instance Method Summary collapse
- #destroyed? ⇒ Boolean
- #new? ⇒ Boolean (also: #new_record?)
- #persisted? ⇒ Boolean
Instance Method Details
#destroyed? ⇒ Boolean
16 17 18 |
# File 'lib/her/model/orm/persistance_methods.rb', line 16 def destroyed? @metadata.include?(:destroyed) && @metadata[:destroyed] == true end |
#new? ⇒ Boolean Also known as: new_record?
7 8 9 |
# File 'lib/her/model/orm/persistance_methods.rb', line 7 def new? !@data.include?(:id) end |
#persisted? ⇒ Boolean
12 13 14 |
# File 'lib/her/model/orm/persistance_methods.rb', line 12 def persisted? !new_record? end |