Just a small warning from my own experience: nesting deeper than 1
level is not advised.
It will become very tedious to keep supplying the unneeded lower
levels of nesting in the url. If you know the "bar", you implicitly
also know the "foo". So there is really no need to keep suppling the
"foo", "bar" & "baz" all the time.
I generally use the following nesting setup:
map.resources :foos do |foo|
map.resources :bars do |bar|
This way your routes to the "baz" don't require a "foo".
Also, if you know the "baz" resource, you can always create a direct
route. For the index, new & create actions on "baz", you can the
choose the route which also requires the "bar" to define the scope.