Hi. I have a resource named item. So in my routes.rb I have:
map.resources :item
and I can go to http://localhost:3000/items and see all my items
If I go to /items/1 and see details for item 1 since I am routed to the show action, etc.
This is great but I would also like users to be able to go to a different route as well as item - say myitems. So if a user types in /items or /myitems I want them to go to the same place - controller => items, :action => index
I can define an individual route for each route like:
map.connect 'myitems', :controller => 'items', :action => 'index' map.connect 'myitems/:id', :controller => 'items', :action => ...
but this is not nearly as nice as :resources where I get all those routes created automatically. Can anyone help with this?