These are the routes I would like:
map.forums_new_topic 'forums/:forum_id/:subsection_id/topics/
new', :controller => "topics", :action => "new"
map.forums_show_topic
'forums/:forum_id/:subsection_id/:topic_id', :controller =>
"topics", :action => "show"
however no matter which order they're in it seems like it always tries
to use the "show" route and it crashes because "topics" isn't a id.
Shallow routing was added to Rails 2.2, and encourage you to check it
out.
I never use deeply nested routes myself, because I don't see the point
in adding information, that you already have, to the URL.
By setting :shallow => true on the resource mappings, this:
GET forums/:forum_id/subsection/:subsection_id/topics/topic_id
will turn into this:
GET topics/topic_id
Ryan Bates has an episode on this if you're interested: