Hi,
I add this line in my routes.rb file
map.connect ':controller/:action/:id/:title', :controller => "recipes"
thinking that I am adding the recipe title at the end of the URL and this would only apply to the recipe controller. I have also declared a resource at the beginning of the file like this
map.resources :recipes
The following URL works perfectly fine
http://localhost:3000/recipes/show/84/testing201
http://localhost:3000/recipes/edit/84/testing2010
However, when I say rake routes I get the following for the recipe controller
recipes GET /recipes(.:format) {:controller=>"recipes", :action=>"index"}
POST /recipes(.:format) {:controller=>"recipes", :action=>"create"}
new_recipe GET /recipes/new(.:format) {:controller=>"recipes", :action=>"new"}
edit_recipe GET /recipes/:id/edit(.:format) {:controller=>"recipes", :action=>"edit"}
recipe GET /recipes/:id(.:format) {:controller=>"recipes", :action=>"show"}
PUT /recipes/:id(.:format) {:controller=>"recipes", :action=>"update"}
DELETE /recipes/:id(.:format) {:controller=>"recipes", :action=>"destroy"}
and at the bottom I see this
/:controller/:action/:id/:title
/:controller/:action/:id
/:controller/:action/:id(.:format)
From the output it seems like the title is not applied to the recipe route but it is applied at a global level. How can I fix this, so the wildcard symbol (":title" in "/:controller/:action/:id/:title") is only applicable to the recipes?