Is there a way to programatically set the "back" button in rails to the last url a person was at. for example i want to put something on the bottom of each of my pages like <a href= <%= @session.last_uri %> >Back</a> Is there a variable i can access that holds this information? I am using LoginGenerator but "store location" is not called everywhere once the user is logged in. thanks adam
> Is there a variable i can access that holds this information? I am > using LoginGenerator but "store location" is not called everywhere > once the user is logged in.So, call it everywhere once the user is logged on. As an alternative, you can check the HTTP_REFERER header with this: request.env[''HTTP_REFERER''] -- rick techno-weenie.net
There is also the javascript possibility, by doing a change in the href according to the history. Both the href and history is available in JS. Although, I am rusty in JS so I don''t remember the exact variables to use... Ronny Rick Olson wrote:>>Is there a variable i can access that holds this information? I am >>using LoginGenerator but "store location" is not called everywhere >>once the user is logged in. > > > So, call it everywhere once the user is logged on. > > As an alternative, you can check the HTTP_REFERER header with this: > > request.env[''HTTP_REFERER''] >