Module: Alchemy::TouchElements
- Included in:
- Attachment, Picture
- Defined in:
- app/models/concerns/alchemy/touch_elements.rb
Overview
If the model has a elements
association, it updates all their timestamps after save.
Should only be used on bottom to top relations, e.g. Alchemy::Picture
or Alchemy::Attachment
not on top to bottom ones like Alchemy::Page
.
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
12 13 14 |
# File 'app/models/concerns/alchemy/touch_elements.rb', line 12 def self.included(base) base.after_update(:touch_elements) end |