Forum: Ruby on Rails Change redirect after method 'redirect_to'

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
C1ce26369f769e8df52e112b5b4fa0b0?d=identicon&s=25 Eduardo Rocha (Guest)
on 2006-02-13 05:14
I want to be able to change the redirection url after I called
redirect_to, is that possible?

My specific use case is that I want to change the default redirection of
"Login Engine" method signup, but I am seeing no other way then
copy/past and change the parameters of redirect_to.

This questions extends to render method as well, I want is to avoid
DoubleRenderError exception.
821395fe70906c8290df7f18ac4ac6cf?d=identicon&s=25 Rick Olson (Guest)
on 2006-02-13 05:43
(Received via mailing list)
On 2/12/06, Eduardo Rocha <eduardorochabr@gmail.com> wrote:
> I want to be able to change the redirection url after I called
> redirect_to, is that possible?
>
> My specific use case is that I want to change the default redirection of
> "Login Engine" method signup, but I am seeing no other way then
> copy/past and change the parameters of redirect_to.
>
> This questions extends to render method as well, I want is to avoid
> DoubleRenderError exception.

Looking at the source of the method, you see it calls
response.redirect and response.redirected_to.  You could try doing the
same and seeing what happens.

http://dev.rubyonrails.org/browser/trunk/actionpac...

--
Rick Olson
http://techno-weenie.net
This topic is locked and can not be replied to.