Module: MuteUpdatedAt::InstanceMethods
- Defined in:
- lib/mute_updated_at.rb
Instance Method Summary collapse
-
#set_updated_at ⇒ Object
Explicitly update updated_at.
-
#skip_timestamping ⇒ Object
callback Set record_timestamps to false before updating.
-
#skip_updated_at_and_save ⇒ Object
Do not update updated_at and update the record.
Instance Method Details
#set_updated_at ⇒ Object
Explicitly update updated_at
38 39 40 |
# File 'lib/mute_updated_at.rb', line 38 def set_updated_at touch end |
#skip_timestamping ⇒ Object
callback Set record_timestamps to false before updating
19 20 21 22 23 24 |
# File 'lib/mute_updated_at.rb', line 19 def unless new_record? self. = false end true end |
#skip_updated_at_and_save ⇒ Object
Do not update updated_at and update the record
28 29 30 31 32 33 34 |
# File 'lib/mute_updated_at.rb', line 28 def skip_updated_at_and_save unless new_record? self. = false save! self. = true end end |