Sha256: 5d257a414deb8b50590d5606db4562b971de2751f84907a1e44dd2aa14bb39e3
Contents?: true
Size: 546 Bytes
Versions: 9
Compression:
Stored size: 546 Bytes
Contents
class CreateKktShoppeProductTranslationTable < ActiveRecord::Migration def up KktShoppe::Product.create_translation_table! :name => :string, :permalink => :string, :description => :text, :short_description => :text KktShoppe::Product.all.each do |p| l = p.translations.new l.locale = "en" l.name = p.name l.permalink = p.permalink l.description = p.description l.short_description = p.short_description l.save! end end def down KktShoppe::Product.drop_translation_table! end end
Version data entries
9 entries across 9 versions & 1 rubygems