rails 5: replace redirect_to :back with redirect_back
ref: https://blog.bigbinary.com/2016/02/29/rails-5-improves-redirect_to_back-with-redirect-back.html
This commit is contained in:
@@ -110,7 +110,7 @@ class ApplicationController < ActionController::Base
|
||||
elsif exception.is_a?(NotImplementedError)
|
||||
flash[:notice] = "This feature isn't available: #{@exception.message}"
|
||||
respond_to do |fmt|
|
||||
fmt.html { redirect_to :back }
|
||||
fmt.html { redirect_back fallback_location: root_path }
|
||||
fmt.js { render nothing: true, status: 501 }
|
||||
fmt.json { render template: "static/error", status: 501 }
|
||||
fmt.xml { render template: "static/error", status: 501 }
|
||||
|
||||
Reference in New Issue
Block a user