Module DataMapper::Timestamps
In: lib/dm-timestamps.rb

Methods

included   touch  

Classes and Modules

Module DataMapper::Timestamps::ClassMethods
Class DataMapper::Timestamps::InvalidTimestampName

Constants

TIMESTAMP_PROPERTIES = { :updated_at => [ DateTime, lambda { |r| DateTime.now } ], :updated_on => [ Date, lambda { |r| Date.today } ], :created_at => [ DateTime, lambda { |r| r.created_at || (DateTime.now if r.new?) } ], :created_on => [ Date, lambda { |r| r.created_on || (Date.today if r.new?) } ], }.freeze

Public Class methods

Public Instance methods

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

[Validate]