Sha256: f42fd956d0efdd564b71e5c97884dce97a2fd4156ec6545672f8827aaecf0b73

Contents?: true

Size: 308 Bytes

Versions: 2

Compression:

Stored size: 308 Bytes

Contents

class MigrateStripePreferences < SolidusSupport::Migration[4.2]
  def up
    Spree::Preference.where("#{ActiveRecord::Base.connection.quote_column_name("key")} LIKE 'spree/gateway/stripe_gateway/login%'").each do |pref|
      pref.key = pref.key.gsub('login', 'secret_key')
      pref.save
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
solidus_gateway-1.3.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
solidus_gateway-1.2.0 db/migrate/20131112133401_migrate_stripe_preferences.rb