Module: Socialization::ActiveRecordStores::Mixins::Base

Included in:
Follow, Like, Socialization::ActiveRecordStores::Mention
Defined in:
lib/socialization/stores/active_record/mixins/base.rb

Instance Method Summary collapse

Instance Method Details

#update_counter(model, counter) ⇒ Object



5
6
7
8
# File 'lib/socialization/stores/active_record/mixins/base.rb', line 5

def update_counter(model, counter)
  column_name, _ = counter.first
  model.class.update_counters model.id, counter if model.respond_to?(column_name)
end