module MarkMapper::Plugins::Timestamps

Public Instance Methods

update_timestamps() click to toggle source
# File lib/mark_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
end