Topic: restful searching
I've got an app that is using restful routes and I'm eventually going to implement a search engine (acts as ferret unless anyone has a better suggestion). I have a bunch of nested routes but before I tie them all together I wanted to ask a question about flexibility.
If a place can be reached by
place/1 or regions/3/place/1 is that going to give a search engine a hard time? Already I'm having a difficult time figuring out how to work the "show" links.
For example, in regions/3 if I list all the places, then clicking on show brings me to place/1 instead of regions/3/place/1
In order for me to get show to bring me to regions/3/place/1 I have to get rid of the nested route for place (map.resources :places do |places|)and also get rid of my name_prefix in the regions nest:
map.resources :regions do |regions|
regions.resources :places, :name_prefix => 'region_' do |places|
So, what do you all think? Is too much flexibility bad when it comes to routes? Is it more trouble than it's worth? I sort of want to settle on a way forward before I tackle search.
Thanks in advance for the advice..