Sha256: 007cb8a5ba338357ea2d0ae2204ef4353159c134f75b293b714f964fed2318b2
Contents?: true
Size: 377 Bytes
Versions: 28
Compression:
Stored size: 377 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
28 entries across 28 versions & 3 rubygems