views:

54

answers:

1

I am working with Rails 2.2.

The required behaviour is as follows:

I have a link(with a ajax link embedded)

xyz.com/admin#page1

When I go to the above page, I should be redirected to the login page, if I am not logged in.

After I log in, I should be taken back to

xyz.com/admin#page1

For this I need to store the url in session when I visit any page.

The problem is that when I do request.uri, I get xyz.com/admin

But I want to store xyz.com/admin#page1

Regards, Pankaj

+1  A: 

# params don't send to server, so if you want to store # params you should save it in javascript to cookies

Aleksandr Koss