Hi, Is session[:return_to] something Rails maintains to quickly go back to the previous uri without having to keep track of the action name? Or, do we have to actually set it in our actions? Thanks.
on 2006-05-10 09:20
on 2006-05-10 12:25
on 2006-05-10 18:24
On May 10, 2006, at 12:17 AM, Sam Donaldson wrote: > Is session[:return_to] something Rails maintains to quickly go back > to the previous uri without having to keep track of the action > name? Or, do we have to actually set it in our actions? (Assuming you're referring to the earlier url_back code sample.) You must set it yourself. Rails can't tell which page you wish to return to or when such a setting is appropriate. I like embedding return_to in form parameters because the user can work with multiple tabs/windows without having one tab return to the other's :return_to. Best, jeremy