Module: Spira::Timestamps
- Defined in:
- lib/spira/timestamps.rb,
lib/spira/timestamps/version.rb
Defined Under Namespace
Modules: ClassMethods
Constant Summary collapse
- VERSION =
"0.0.1"
Class Method Summary collapse
Instance Method Summary collapse
-
#touch ⇒ Object
Update this model’s ‘updated` time without making any other changes.
Class Method Details
.included(model) ⇒ Object
8 9 10 11 12 |
# File 'lib/spira/timestamps.rb', line 8 def self.included(model) model.before_save :before_save model.extend ClassMethods model. end |
Instance Method Details
#touch ⇒ Object
Update this model’s ‘updated` time without making any other changes.
15 16 17 18 |
# File 'lib/spira/timestamps.rb', line 15 def touch save end |