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-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Jarkko Laine
http://jlaine.net
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails