Sha256: 56d904cca144b4c2934711027563bd9b432f251a940855bb0cffcf2f77297c9a
Contents?: true
Size: 400 Bytes
Versions: 9
Compression:
Stored size: 400 Bytes
Contents
class MigrateDataPaymentMethodsStores < ActiveRecord::Migration[6.0] def up Spree::PaymentMethod.all.each do |payment_method| next if payment_method.store_ids.any? if payment_method[:store_id].present? payment_method.store_ids = payment_method[:store_id] else payment_method.store_ids = Spree::Store.ids end payment_method.save end end end
Version data entries
9 entries across 9 versions & 1 rubygems