--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Redirects the browser to the target specified in <tt>options</tt>. This parameter can take one of three forms:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>Hash</tt> - The URL will be generated by calling url_for with the <tt>options</tt>.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>Record</tt> - The URL will be generated by calling url_for with the <tt>options</tt>, which will reference a named URL for that record.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>String starting with protocol:// (like http://)</tt> - Is passed straight through as the target for redirection.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>String not containing a protocol</tt> - The current protocol and host is prepended to the string.
  - !ruby/struct:SM::Flow::LI 
    label: "*"
    body: <tt>:back</tt> - Back to the page that issued the request. Useful for forms that are triggered from multiple places. Short-hand for redirect_to(request.env[&quot;HTTP_REFERER&quot;])
  type: :BULLET
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  redirect_to :action =&gt; &quot;show&quot;, :id =&gt; 5\n  redirect_to post\n  redirect_to &quot;http://www.rubyonrails.org&quot;\n  redirect_to &quot;/images/screenshot.jpg&quot;\n  redirect_to articles_url\n  redirect_to :back\n"
- !ruby/struct:SM::Flow::P 
  body: The redirection happens as a &quot;302 Moved&quot; header unless otherwise specified.
- !ruby/struct:SM::Flow::P 
  body: "Examples:"
- !ruby/struct:SM::Flow::VERB 
  body: "  redirect_to post_url(@post), :status=&gt;:found\n  redirect_to :action=&gt;'atom', :status=&gt;:moved_permanently\n  redirect_to post_url(@post), :status=&gt;301\n  redirect_to :action=&gt;'atom', :status=&gt;302\n"
- !ruby/struct:SM::Flow::P 
  body: When using <tt>redirect_to :back</tt>, if there is no referrer, RedirectBackError will be raised. You may specify some fallback behavior for this case by rescuing RedirectBackError.
full_name: ActionController::Base#redirect_to
is_singleton: false
name: redirect_to
params: (options = {}, response_status = {})
visibility: protected
