Sha256: 2e625338a8b4b5f41635a95effa594578af40bc62af9817c74f0a030489b0ae6

Contents?: true

Size: 308 Bytes

Versions: 25

Compression:

Stored size: 308 Bytes

Contents

class MigrateStripePreferences < SpreeExtension::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

25 entries across 25 versions & 1 rubygems

Version Path
spree_gateway-3.9.4 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.9.3 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.9.2 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.9.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.8.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.7.5 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.7.4 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.7.3 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.7.2 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.7.1 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.7.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.6.7 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.3.7 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.6.5 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.6.4 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.3.5 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.6.1 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.6.0 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.4.1 db/migrate/20131112133401_migrate_stripe_preferences.rb
spree_gateway-3.4.0 db/migrate/20131112133401_migrate_stripe_preferences.rb