mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Memoize selected_payment_method
This commit is contained in:
@@ -63,7 +63,7 @@ class SplitCheckoutController < ::BaseController
|
||||
end
|
||||
|
||||
def selected_payment_method
|
||||
@order.payments.order(:created_at).last&.payment_method
|
||||
@selected_payment_method ||= @order.payments.order(:created_at).last&.payment_method
|
||||
end
|
||||
|
||||
def update_order
|
||||
|
||||
Reference in New Issue
Block a user