module Mongoid::Timestamps::Timeless::ClassMethods

Public Instance Methods

timeless() click to toggle source

Begin an execution that should skip timestamping.

@example Create a document but don't timestamp.

Person.timeless.create(:title => "Sir")

@return [ Class ] The class this was called on.

@since 2.3.0

# File lib/mongoid/timestamps/timeless.rb, line 44
def timeless
  Threaded.timeless = true
  self
end