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.

Do not use dependent destroy on payment_method - store relationship.

Matthew Kennedya9c65c3642d3
diff --git a/core/app/models/spree/store.rb b/core/app/models/spree/store.rb
index f0ffa5ad5c..5616c3c39b 100644
--- a/core/app/models/spree/store.rb
+++ b/core/app/models/spree/store.rb
@@ -5,7 +5,7 @@ module Spree
has_many :orders, class_name: 'Spree::Order'
- has_many :store_payment_methods, class_name: 'Spree::StorePaymentMethod', dependent: :destroy
+ has_many :store_payment_methods, class_name: 'Spree::StorePaymentMethod'
has_many :payment_methods, through: :store_payment_methods, class_name: 'Spree::PaymentMethod'
has_many :menus