Module: Mongoid::Timestamps::Timeless::ClassMethods

Defined in:
lib/mongoid/timestamps/timeless.rb

Overview

:nodoc

Instance Method Summary collapse

Instance Method Details

#timelessClass

Begin an execution that should skip timestamping.

Examples:

Create a document but don’t timestamp.

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

Returns:

  • (Class)

    The class this was called on.

Since:

  • 2.3.0



44
45
46
# File 'lib/mongoid/timestamps/timeless.rb', line 44

def timeless
  tap { Threaded.timeless = true }
end