Module: MotionRecord::Persistence
- Included in:
- Base
- Defined in:
- lib/motion_record/persistence.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- TIMESTAMP_COLUMNS =
[:created_at, :updated_at]
Instance Method Summary collapse
- #destroy ⇒ Object
- #mark_persisted! ⇒ Object
- #mark_unpersisted! ⇒ Object
- #persisted? ⇒ Boolean
- #save ⇒ Object
Instance Method Details
#destroy ⇒ Object
10 11 12 |
# File 'lib/motion_record/persistence.rb', line 10 def destroy delete! end |
#mark_persisted! ⇒ Object
18 19 20 |
# File 'lib/motion_record/persistence.rb', line 18 def mark_persisted! @persisted = true end |
#mark_unpersisted! ⇒ Object
22 23 24 |
# File 'lib/motion_record/persistence.rb', line 22 def mark_unpersisted! @persisted = false end |
#persisted? ⇒ Boolean
14 15 16 |
# File 'lib/motion_record/persistence.rb', line 14 def persisted? !!@persisted end |
#save ⇒ Object
6 7 8 |
# File 'lib/motion_record/persistence.rb', line 6 def save persist! end |