class MigrateStripePreferences < ActiveRecord::Migration
  def up
    Spree::Preference.all.where("key LIKE 'spree/gateway/stripe_gateway/login%'").each do |pref|
      pref.key = pref.key.gsub('login', 'secret_key')
      pref.save
    end
  end
end

class MigrateStripePreferences < ActiveRecord::Migration
  def up
    Spree::Preference.where("key LIKE 'spree/gateway/stripe_gateway/login%'").each do |pref|
      pref.key = pref.key.gsub('login', 'secret_key')
      pref.save
    end
  end
end

Fix undefined method where for Array error in migration.
Fix undefined method where for Array error in migration.
