Reputation: 3789
I have a URL that looks like this:
https://host.com/imageviewer/namespace.001.587#page/1/mode/2down
I need to generate a rails route for this such that I can get namespace.001.587
out as the id
and get it to route to the ImageViewer#show_image
action, I also need to get 2down
as the mode, and 1
as the page. Not being a clean RESTful URL, I'm finding this difficult to do in Rails. I'm only calling GET
on this URL.
How would you generate this route?
Upvotes: 0
Views: 32
Reputation: 19879
You can't. The server is never sent the hash (ie. anything after the #). That's a client side only thing. So you'll need to adjust the url or url escape the # to make it work.
Upvotes: 1