Module: Mongoid::Timestamps::Timeless::ClassMethods
- Defined in:
- lib/workarea/ext/mongoid/timestamps_timeless.rb
Instance Method Summary collapse
Instance Method Details
#clear_timeless_option_on_update ⇒ Object
41 42 43 44 45 46 47 |
# File 'lib/workarea/ext/mongoid/timestamps_timeless.rb', line 41 def clear_timeless_option_on_update if counter = Timeless[name] counter -= 1 if self < Mongoid::Timestamps::Created counter -= 1 if self < Mongoid::Timestamps::Updated Timeless[name] = (counter == 0) ? nil : counter end end |