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.

Update payment method samples data.

Matthew Kennedyb8aaddb05077
diff --git a/sample/db/samples/payment_methods.rb b/sample/db/samples/payment_methods.rb
index a049864e89..e5bf545c5f 100644
--- a/sample/db/samples/payment_methods.rb
+++ b/sample/db/samples/payment_methods.rb
@@ -1,15 +1,17 @@
-Spree::Gateway::Bogus.where(
+cc_payment_method = Spree::Gateway::Bogus.where(
name: 'Credit Card',
description: 'Bogus payment gateway.',
active: true
-).first_or_create! do |payment_method|
- payment_method.store_ids = Spree::Store.ids
-end
+).first_or_create!
-Spree::PaymentMethod::Check.where(
+cc_payment_method.store_ids = Spree::Store.ids
+cc_payment_method.save!
+
+check_paymemt_method = Spree::PaymentMethod::Check.where(
name: 'Check',
description: 'Pay by check.',
active: true
-).first_or_create! do |payment_method|
- payment_method.store_ids = Spree::Store.ids
-end
+).first_or_create!
+
+check_paymemt_method.store_ids = Spree::Store.ids
+check_paymemt_method.save!