Module: DataMapper::Actionstamps::ReceiverMethods

Defined in:
lib/dm-actionstamps/actionstamps.rb

Class Method Summary collapse

Instance Method Summary collapse

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

#touchObject

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