I’m switching over to RESTful routing and was looking forward to using
the nested routing to make things a lot more convenient. However I’ve
found that I don’t seem to be able to use both nested routes AND
“direct” RESTful routes on the same controller.
For example, I would like to have both of these URLs:
Actually, the above seems to work from a routing standpoint. Using
*_path to construct my links does not seem to work.
If I have:
map.resources :user do |user|
…then this will not work:
It constructs a path like “/user/1/invoice”.
If I change the order in routes.rb and do the nested route first, the
direct URL is correct but I can’t specify a parent any longer in *_path.