mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-02-27 01:43:22 +00:00
Start respond_override
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
# If a user fires an event on a payment from the orders page, set the responder to takes you back to the orders page (not payments page)
|
||||
#Responder: http://guides.spreecommerce.com/developer/logic.html#overriding-controller-action-responses
|
||||
|
||||
Spree::Admin::PaymentsController.class_eval do
|
||||
respond_override :fire => { :html => { :success => lambda {
|
||||
#if referrer == orders#index
|
||||
# redirect_to orders#index
|
||||
} } }
|
||||
end
|
||||
Reference in New Issue
Block a user