I have this code in my controller:
redirect_to projects_path(:anchor => 'p5')
It works fine in Chrome, FF, and Safari, and the browser url shows:
/projects#p5
However, IE ignores the anchor altogether, and uses the url without it:
/projects
Is there a workaround to this? When will IE cease to exist?
Edit:
The issue is with IE7.
Per a comment below, outputting <%= (debug projects_path(:anchor => 'p5')).html_safe %> gives:
--- /projects#p5
...
IE9 and below don’t retain anchors/fragments on redirects. I think you need to find another way of accomplishing what you want with the redirect.