Clears the redirected results from the headers, resets the status to 200 and returns the URL that was used to redirect or nil if there was no redirected URL Note that redirect_to will change the body of the response to indicate a redirection. The response body is not reset here, see erase_render_results
Source Code
# File action_controller/base.rb, line 974 def erase_redirect_results #:nodoc: @performed_redirect = false response.redirected_to = nil response.redirected_to_method_params = nil response.headers['Status'] = DEFAULT_RENDER_STATUS_CODE response.headers.delete('Location') end
<code/>and<pre/>for code samples.