Module: Mongoid::Timestamps::Timeless
- Extended by:
- ActiveSupport::Concern
- Included in:
- Components
- Defined in:
- lib/mongoid/timestamps/timeless.rb
Overview
This module adds behaviour for turning off timestamping in single or multiple calls.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#timeless ⇒ Document
Begin an execution that should skip timestamping.
-
#timestamping? ⇒ true, false
Are we currently timestamping?.
Instance Method Details
#timeless ⇒ Document
Begin an execution that should skip timestamping.
18 19 20 |
# File 'lib/mongoid/timestamps/timeless.rb', line 18 def timeless tap { Threaded.timeless = true } end |
#timestamping? ⇒ true, false
Are we currently timestamping?
30 31 32 |
# File 'lib/mongoid/timestamps/timeless.rb', line 30 def Threaded. end |