Rails: Extracting the raw url from the request
- by pankajbhageria
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