Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

Associate sample payment methods to all existing stores.

Matthew Kennedyd9b899b22b68
diff --git a/sample/db/samples/payment_methods.rb b/sample/db/samples/payment_methods.rb
index a1f7912766..a049864e89 100644
--- a/sample/db/samples/payment_methods.rb
+++ b/sample/db/samples/payment_methods.rb
@@ -2,10 +2,14 @@ Spree::Gateway::Bogus.where(
name: 'Credit Card',
description: 'Bogus payment gateway.',
active: true
-).first_or_create!
+).first_or_create! do |payment_method|
+ payment_method.store_ids = Spree::Store.ids
+end
Spree::PaymentMethod::Check.where(
name: 'Check',
description: 'Pay by check.',
active: true
-).first_or_create!
+).first_or_create! do |payment_method|
+ payment_method.store_ids = Spree::Store.ids
+end