module MongoMapper::Plugins::Timestamps
Public Instance Methods
update_timestamps()
click to toggle source
# File lib/mongo_mapper/plugins/timestamps.rb, line 20 def update_timestamps if self.record_timestamps now = Time.now.utc self[:created_at] = now if !persisted? && !created_at? self[:updated_at] = now end true end