Redirect_to with hash vs string and docs

Hi,

When I use redirect_to with a string (eg. redirect_to
http://www.yahoo.com”), the browser is sent a response with a header
containing status 302. This is good for what I am doing.

If I use redirect_to with a hash (eg. redirect_to :action=>‘list’),
the browser is sent a response with status 200 and the body contains
the destination of the redirection. This saves one back and forth
between the user and the server. This is good for other situations I’m
sure but redirect_to() documentation does not explain this important
difference.

Do I understand the two behaviors correctly?

Thanks,
Peter

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs