module MongoMapper::Plugins::Timestamps::ClassMethods

Public Instance Methods

timestamps!() click to toggle source
# File lib/mongo_mapper/plugins/timestamps.rb, line 13
def timestamps!
  key :created_at, Time
  key :updated_at, Time
  class_eval { before_save :update_timestamps }
end