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.

Use nicer syntax

Damian Legawiec2ddae060985d
diff --git a/core/app/models/spree/order.rb b/core/app/models/spree/order.rb
index 3f3dd5480a..0606935745 100644
--- a/core/app/models/spree/order.rb
+++ b/core/app/models/spree/order.rb
@@ -734,7 +734,7 @@ module Spree
end
store ||= self.store
- PaymentMethod.for_store(store).available_on_front_end.select { |pm| pm.available_for_order?(self) }
+ store.payment_methods.available_on_front_end.select { |pm| pm.available_for_order?(self) }
end
def credit_card_nil_payment?(attributes)