Methods

DataMapper::Timestamps

Public Class Methods

included(model) click to toggle source
# File lib/dm-timestamps.rb, line 12
def self.included(model)
  model.before :save, :set_timestamps_on_save
  model.extend ClassMethods
end

Public Instance Methods

touch() click to toggle source

Saves the record with the updated_at/on attributes set to the current time.

# File lib/dm-timestamps.rb, line 18
def touch
  set_timestamps
  save
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.