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
-
#clear_timeless_option ⇒ true
Clears out the timeless option.
-
#timeless ⇒ Document
Begin an execution that should skip timestamping.
Instance Method Details
#clear_timeless_option ⇒ true
Clears out the timeless option.
23 24 25 |
# File 'lib/mongoid/timestamps/timeless.rb', line 23 def clear_timeless_option self.class. = true end |
#timeless ⇒ Document
Begin an execution that should skip timestamping.
35 36 37 38 |
# File 'lib/mongoid/timestamps/timeless.rb', line 35 def timeless self.class. = false self end |