Sha256: 12f2266d1a8070afef6e0ccf01e98a141f7656d8b6f4d200b3d0db3e3e0f50c1

Contents?: true

Size: 579 Bytes

Versions: 9

Compression:

Stored size: 579 Bytes

Contents

# frozen_string_literal: true

# Based on issue https://github.com/spree-contrib/spree_multi_vendor/issues/104
# This is a patch for Spree globalize to be friendly with the gem

class AddTranslationsToVendor < ActiveRecord::Migration[4.2]
  def up
    params = { name: :string, about_us: :text, contact_us: :text, slug: :string }
    if defined?(SpreeGlobalize)
      Spree::Vendor.create_translation_table!(params, { migrate_data: true })
    end
  end

  def down
    if defined?(SpreeGlobalize)
      Spree::Vendor.drop_translation_table! migrate_data: true
    end
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
spree_multi_vendor-2.5.0 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.4.1 db/migrate/20200416030721_add_translations_to_vendor.rb
atkhayar-dev-spree-multi-vendor-0.0.0 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.4.0 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.3.0 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.2.0 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.1.0 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.0.2 db/migrate/20200416030721_add_translations_to_vendor.rb
spree_multi_vendor-2.0.1 db/migrate/20200416030721_add_translations_to_vendor.rb