Pankaj
Pankaj

Reputation: 2558

Rails: Extracting the raw url from the request

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

Upvotes: 1

Views: 288

Answers (1)

Sasha Koss
Sasha Koss

Reputation: 16386

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

Upvotes: 1

Related Questions