Sha256: cf3099344ac789fb17a2aa96a1ab2a762a5903f7076940bd65d1d97d42dd8069
Contents?: true
Size: 400 Bytes
Versions: 10
Compression:
Stored size: 400 Bytes
Contents
class MigrateDataPaymentMethodsStores < ActiveRecord::Migration[5.2] 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
10 entries across 10 versions & 1 rubygems