routing a restful controller to work from site root

hi i have rewritten my map.resources so that a resource is called from
the start: map.connect '', :controller => "resource"

so lists the available resource

however i want to show one of a particular resource
rather than as is the default restful route.

how can i get this url?


this is great but what about with nested resources?


A few things in you post don't make sense to me...

1. You say that is a "RESTful route," but it's
not. RESTful routes don't include the action (show) in this case.
Say if your resource/model was Post then the RESTful URL would look
something like Notice there's no mention of
the action. The action is based on the HTTP verb used to access the
URL. Show would be a GET request, POST to create, PUT to update,
DELETE to destroy.

2. If you are using RESTful routes you would use map.resources not
map.connect to declare your resources, which in turn creates the

3. If what you really mean is that you want to drop the resource out
of the URL, which I must assume your application has only one main
resource and everything else in the database is nested, then you would
need to use map.connect or a named route to do that.