Sha256: b4afed59eaa9cdf3f4df7dba2781acf4eac3d03b68286caaa411c45e766eed5e

Contents?: true

Size: 301 Bytes

Versions: 12

Compression:

Stored size: 301 Bytes

Contents

class MigrateStripePreferences < ActiveRecord::Migration
  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

12 entries across 12 versions & 3 rubygems

Version Path
spree_gateway-3.2.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.2.0.beta db/migrate/20131112133401_migrate_stripe_preferences.rb
solidus_gateway-1.1.1 db/migrate/20131112133401_migrate_stripe_preferences.rb
solidus_gateway-1.1.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.1.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.0.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
solidus_gateway-1.0.1 db/migrate/20131112133401_migrate_stripe_preferences.rb
solidus_gateway-0.9.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
solidus_gateway-1.0.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_first_data_gge4-3.0.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-2.2.1 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-2.1.1 db/migrate/20131112133401_migrate_stripe_preferences.rb