Sha256: 1b99e570b24acafd7e8d2f2e297e4bb9c63e42592fdbd9a29d72f35de4f72d9f
Contents?: true
Size: 534 Bytes
Versions: 6
Compression:
Stored size: 534 Bytes
Contents
class CreateShoppeProductTranslationTable < ActiveRecord::Migration def up Shoppe::Product.create_translation_table! :name => :string, :permalink => :string, :description => :text, :short_description => :text Shoppe::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 Shoppe::Product.drop_translation_table! end end
Version data entries
6 entries across 6 versions & 2 rubygems