Module: DataMapper::Actionstamps::ReceiverMethods
- Defined in:
- lib/dm-actionstamps/actionstamps.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#touch ⇒ Object
Saves the record with the created_? / updated_? attributes set to the current time.
Class Method Details
.included(model) ⇒ Object
111 112 113 114 |
# File 'lib/dm-actionstamps/actionstamps.rb', line 111 def self.included(model) model.before :save, :set_actionstamps_on_save model.extend DataMapper::Actionstamps::ClassMethods end |
Instance Method Details
#touch ⇒ Object
Saves the record with the created_? / updated_? attributes set to the current time.
Examples
@model.touch
124 125 126 127 |
# File 'lib/dm-actionstamps/actionstamps.rb', line 124 def touch set_actionstamps save end |