Sha256: cdb704e2389133b5b5df5ad12ccd747d07c6dbc22763f2481bba66af7e869d2c
Contents?: true
Size: 452 Bytes
Versions: 121
Compression:
Stored size: 452 Bytes
Contents
# This migration comes from acts_as_taggable_on_engine (originally 3) class AddTaggingsCounterCacheToTags < ActiveRecord::Migration[4.2] 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
121 entries across 121 versions & 4 rubygems