There is many users available in my project. Each user have different home page. And also i have a default home page. My actual code is here..
requested_url = "/limited/username" #It is constantly changing.
redirect_to(requested_url || :action => "index", :controller => "demo")
So, it redirect the page like this http://localhost:3000/demo/index?%2Flimited=username. But, actually i need the redirected url like this http://localhost:3000/limited/username.
If the requested_url is empty then, it redirects correctly. (http://localhost:3000/demo/index). But, if its not empty then, it redirects wrongly.
Please tell me what is the problem here?.
||has higher operator precedence than=>, so your redirect call is interpreted asTry this instead: