开发者

Rails: Extracting the raw url from the request

开发者 https://www.devze.com 2022-12-26 20:49 出处:网络
I am working with Rails 2.2. The required behaviour is as follows: I have a link(with a ajax link embedded)

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


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

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号