I need to create a pretty route for an action that is expecting ugly nested parameter names (this is set and not something I can change at this time).
So instead of
http://domain.com/programs/search?program[type]=leader&program[leader_id]=12345
I want
http://domain.com/programs/search/leader/12345
The problem is that Rails route definitions won't handle complex parameter names.
map.programs 'programs/:program[type]/:program[leader_id]', :controller=>..., :action=>...
Again, I'm not able to change the controller - it's set up to expect these parameter names based on a set of pre-existing search forms. I just want to create a more readable route for some pre-defined searches.
Surely there must be a way to create a route that passes input data to parameters with names that are more complex than single-word-downcase-alpha.
Thanks