I would like to map the following legacy url:
/:user_id/comments
comments is a resource, so in an idea world I would use something like:
resources :users, :prefix => nil do
resources :comments
end
Here I’m using prefix => nil but what I really want is to map just the user id. So instead of /users/:user_id/comments/ I have /:user_id/comments/.
Note that I’m not interested in declaring a users resource, so if there’s something like a namespace that I can use instead all the better.
What I ended up using was: