I have a search form that generates ugly but functional urls.The
controller takes nested parameters from the url like program
[program_id], or program[leader][leader_id].
So I'm trying to create a named route to make certain pre-defined
searches easier for customers to embed in their own pages.
So instead of
"https://ourdomain.com/search?program[leader_id]=12345"
Id like to have
"https://ourdomain.com/leader/12345"
The problem is that a named Rails route won't accept a complex symbol
in the path definition:
map.leader 'leader/:program[leader_id]'
fails due to the brackets in parameter name symbol. Even properly
defining the symbol as
map.leader "leader/:'program[leader_id]'"
fails. Rails just won't recognize anything other than a downcase
single word.
... and I'm not in a position to change how the controller works or
redefine the expected incoming parameters.
Thoughts or suggestions or workarounds?
Thanks,
Bill
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---