Module: Mongoid::MagicCounterCache::ModernCache

Defined in:
lib/mongoid/magic_counter_cache.rb

Instance Method Summary collapse

Instance Method Details

#actual_model_nameObject


55
56
57
# File 'lib/mongoid/magic_counter_cache.rb', line 55

def actual_model_name
  model_name.name
end

#increment_association(association, counter_name, inc) ⇒ Object


59
60
61
# File 'lib/mongoid/magic_counter_cache.rb', line 59

def increment_association(association, counter_name, inc)
  association.inc(counter_name => inc)
end