Sha256: 0ca2bbc66e049ba8a287dc4511842f2ecf7a598c98865964d9839d3fe2cc389c
Contents?: true
Size: 376 Bytes
Versions: 33
Compression:
Stored size: 376 Bytes
Contents
class AddTaggingsCounterCacheToTags < ActiveRecord::Migration def self.up add_column :tags, :taggings_count, :integer, default: 0 ActsAsTaggableOn::Tag.reset_column_information ActsAsTaggableOn::Tag.find_each do |tag| ActsAsTaggableOn::Tag.reset_counters(tag.id, :taggings) end end def self.down remove_column :tags, :taggings_count end end
Version data entries
33 entries across 17 versions & 1 rubygems