Sha256: 83b4e7404803e7999b383496782d0d47cdb3dcbba4190e9e7c0a6d3e6fab6d3a

Contents?: true

Size: 523 Bytes

Versions: 11

Compression:

Stored size: 523 Bytes

Contents

class CreateSpreeStoreCreditPaymentMethod < ActiveRecord::Migration
  class PaymentMethod < ActiveRecord::Base
    self.table_name = 'spree_payment_methods'
    self.inheritance_column = :_type_disabled
  end
  def up
    PaymentMethod.create_with(
      name: Spree.t("store_credit.store_credit"),
      description: Spree.t("store_credit.store_credit"),
      active: true,
      display_on: 'none',
    ).find_or_create_by!(
      type: "Spree::PaymentMethod::StoreCredit",
      environment: Rails.env,
    )
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
solidus_core-1.0.7 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.6 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.5 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.4 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.3 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.2 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.1 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.0 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.0.rc2 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.0.rc1 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb
solidus_core-1.0.0.pre3 db/migrate/20150506181611_create_spree_store_credit_payment_method.rb