Sha256: 71ec12da6bb0946b920deee988f398d27f7342e04151762c55b420c5d5e9f414
Contents?: true
Size: 494 Bytes
Versions: 6
Compression:
Stored size: 494 Bytes
Contents
class CreateShoppeProductCategoryTranslationTable < ActiveRecord::Migration def up Shoppe::ProductCategory.create_translation_table! :name => :string, :permalink => :string, :description => :text Shoppe::ProductCategory.all.each do |pc| l = pc.translations.new l.locale = "en" l.name = pc.name l.permalink = pc.permalink l.description = pc.description l.save! end end def down Shoppe::ProductCategory.drop_translation_table! end end
Version data entries
6 entries across 6 versions & 2 rubygems