mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-28 06:15:17 +00:00
Reuse update_failed method as the code needed is exactly the same
This commit is contained in:
@@ -254,13 +254,10 @@ class CheckoutController < Spree::StoreController
|
||||
end
|
||||
|
||||
def rescue_from_spree_gateway_error(error)
|
||||
Bugsnag.notify(error)
|
||||
checkout_failed
|
||||
|
||||
flash[:error] = t(:spree_gateway_error_flash_for_checkout, error: error.message)
|
||||
# This can also happen during the edit action
|
||||
# but the response needed here is the same as when the update action fails
|
||||
update_failed_response
|
||||
# but the actions and response needed are exactly the same as when the update action fails
|
||||
update_failed(error)
|
||||
end
|
||||
|
||||
def permitted_params
|
||||
|
||||
Reference in New Issue
Block a user