Sha256: 21c9f2bf443c85ce52dea4f3c7cd383f14d3a974679098ea5e73567a90970bf3

Contents?: true

Size: 299 Bytes

Versions: 9

Compression:

Stored size: 299 Bytes

Contents

module Socialization
  module ActiveRecordStores
    module Mixins
      module Base
        def update_counter(model, counter)
          column_name, _ = counter.first
          model.class.update_counters model.id, counter if model.respond_to?(column_name)
        end
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
socialization-2.0.2 lib/socialization/stores/active_record/mixins/base.rb
socialization-2.0.1 lib/socialization/stores/active_record/mixins/base.rb
socialization-2.0.0 lib/socialization/stores/active_record/mixins/base.rb
socialization-1.2.3 lib/socialization/stores/active_record/mixins/base.rb
socialization-1.2.2 lib/socialization/stores/active_record/mixins/base.rb
socialization-1.2.1 lib/socialization/stores/active_record/mixins/base.rb
twrk-socialization-1.2.0 lib/socialization/stores/active_record/mixins/base.rb
twrk-socialization-0.0.1 lib/socialization/stores/active_record/mixins/base.rb
socialization-1.2.0 lib/socialization/stores/active_record/mixins/base.rb