mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Update redirect_back syntax for Rails 5
Introduced in 5.0, the old syntax is removed in 5.2
This commit is contained in:
@@ -68,14 +68,16 @@ module Spree
|
||||
rescue Spree::Core::GatewayError => e
|
||||
flash[:error] = e.message.to_s
|
||||
ensure
|
||||
redirect_to :back
|
||||
redirect_back fallback_location: spree.admin_dashboard_path
|
||||
end
|
||||
|
||||
def resend
|
||||
Spree::OrderMailer.confirm_email_for_customer(@order.id, true).deliver_later
|
||||
flash[:success] = t('admin.orders.order_email_resent')
|
||||
|
||||
respond_with(@order) { |format| format.html { redirect_to :back } }
|
||||
respond_with(@order) do |format|
|
||||
format.html { redirect_back(fallback_location: spree.admin_dashboard_path) }
|
||||
end
|
||||
end
|
||||
|
||||
def invoice
|
||||
|
||||
@@ -8,7 +8,7 @@ module Spree
|
||||
def fire
|
||||
@return_authorization.public_send("#{params[:e]}!")
|
||||
flash[:success] = Spree.t(:return_authorization_updated)
|
||||
redirect_to :back
|
||||
redirect_back fallback_location: spree.admin_dashboard_path
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
Reference in New Issue
Block a user