Sha256: 8933e472e32dde8c227804d57bae6bf4d62064e9e4d4fa364744a2e91c9179c2
Contents?: true
Size: 450 Bytes
Versions: 16
Compression:
Stored size: 450 Bytes
Contents
# This migration comes from acts_as_taggable_on_engine (originally 3) 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
16 entries across 16 versions & 1 rubygems