views:

12

answers:

0

Hello, guys!

I have model with tag context:

class Product < ActiveRecord::Base
  acts_as_taggable_on :categories
end

I'm trying to initialize tags caching:

class AddCachedCategoryListToProducts < ActiveRecord::Migration
  def self.up
    add_column :products,  :cached_category_list, :string
    Product.reset_column_information
    products = Product.all
    products.each { |p| p.save_cached_tag_list }
  end
end

But cached_category_list does not initializing. What I'm doing wrong? Does anybody can use caching with this gem (my version is 2.0.6)?