Module: Occurro::HasCounters
- Extended by:
- ActiveSupport::Concern
- Defined in:
- lib/occurro/has_counters.rb
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
-
#increment_counter ⇒ Object
Public: Increments the counter in 1 for this model.
Instance Method Details
#increment_counter ⇒ Object
Public: Increments the counter in 1 for this model
26 27 28 29 |
# File 'lib/occurro/has_counters.rb', line 26 def increment_counter return Occurro::CachedCounter.increment_counter(self) if self.class.base_class.counter_cache > 0 Occurro::Jobs::Sender.increment_counters_job(self, 1) end |