Sha256: 53d70da0735cb39b09f57164dda8e5707a744d97b29d45b2b74430656abf2fb3
Contents?: true
Size: 788 Bytes
Versions: 2
Compression:
Stored size: 788 Bytes
Contents
# frozen_string_literal: true # This migration comes from spree_billing_sisow (originally 20150417081217) class ChangeNameOfPaymentMethodTypes < ActiveRecord::Migration[5.0] def up name_maps.each do |old, new| Spree::PaymentMethod.where(type: old).update_all(type: new) end end def down name_maps.each do |old, new| Spree::PaymentMethod.where(type: new).update_all(type: old) end end private def name_maps { 'Spree::BillingIntegration::SisowBilling::Ideal' => 'Spree::PaymentMethod::SisowBilling::Ideal', 'Spree::BillingIntegration::SisowBilling::Bancontact' => 'Spree::PaymentMethod::SisowBilling::Bancontact', 'Spree::BillingIntegration::SisowBilling::Sofort' => 'Spree::PaymentMethod::SisowBilling::Sofort' } end end
Version data entries
2 entries across 2 versions & 1 rubygems