[Rails] @session["return_to"]

Jarkko Laine jarkko at jlaine.net
Wed Dec 15 08:05:05 GMT 2004


Just a guess (I hope someone can confirm this):

@session["return_to"] is always the "referrer" of the request, i.e. the 
page where you came from to the new page. In your case, when you submit 
the form you are coming to a "new" page, even if that page is the same 
where the form was. Then it's in a way quite natural that the return_to 
address changes upon form submit as (or if) it is supposed to 
dynamically point to the last page visited.

//jarkko

On 15.12.2004, at 02:01, Joe Van Dyk wrote:

> Does @session["return_to"] get reset on a form submission?
>
> I've verified that @session["return_to"] is (say) "/houses/list/15" on
> a login form.  However, when the user submits the login form, in the
> form's action, @session["return_to"] is changed to "/login" (the
> login's form controller).
>
> Why is this?
> _______________________________________________
> Rails mailing list
> Rails at lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Jarkko Laine
http://jlaine.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2363 bytes
Desc: not available
Url : http://one.textdrive.com/pipermail/rails/attachments/20041215/433a2956/smime.bin


More information about the Rails mailing list