Module: Cms::Concerns::Addressable::MarkAsDirty
- Defined in:
- lib/cms/concerns/can_be_addressable.rb
Overview
Allows records to be marked as being changed, which can be called to trigger updates when associated objects may have been changed.
Instance Method Summary collapse
-
#dirty! ⇒ Object
Forces this record to be changed, even if nothing has changed This is necessary if just the section.id has changed, for example test if this is necessary now that the attributes are in the model itself.
Instance Method Details
#dirty! ⇒ Object
Forces this record to be changed, even if nothing has changed This is necessary if just the section.id has changed, for example test if this is necessary now that the attributes are in the model itself.
317 318 319 320 |
# File 'lib/cms/concerns/can_be_addressable.rb', line 317 def dirty! # Seems like a hack, is there a better way? self.updated_at = Time.now end |