Module: MongoModel::Timestamps::ClassMethods

Defined in:
lib/mongomodel/concerns/timestamps.rb

Instance Method Summary collapse

Instance Method Details

#timestamps!Object

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



15
16
17
18
# File 'lib/mongomodel/concerns/timestamps.rb', line 15

def timestamps!
  property :created_at, Time
  property :updated_at, Time
end