module MongoModel::Timestamps::ClassMethods

Public Instance Methods

timestamps!() click to toggle source

Defines timestamp properties created_at and updated_at. When the document is created or updated, these properties will be respectively updated.

# File lib/mongomodel/concerns/timestamps.rb, line 15
def timestamps!
  property :created_at, Time
  property :updated_at, Time
end