module Mongoid::Timestamps::CreatedAt

Public Instance Methods

created_at() click to toggle source

Returns the creation time calculated from ObjectID

@return [ Date ] the creation time

# File lib/mongoid/created_at.rb, line 7
def created_at
  read_attribute(:created_at) || id.generation_time.to_datetime
end