You insert routes as deep as you like, since 3.x rails let you smooth them using shallow: true
Try experimenting with
resources :account, shallow: true do resources :people do resources :notes end end
Use rake routes to find out what you get :)
UPDATE in response to comment
As I said, play with rake routes to find out which url you can get
resources :account, shallow: true do resources :people, shallow: true do resources :notes end end
gets these routes
:~/Development/rails/routing_test$ rake routes person_notes GET /people/:person_id/notes(.:format) notes
As you can see, you have access to all models at any level that you need. The rest depends on what you have invested in the actions of your controller.
You really need to work on actions to make sure that you perform the appropriate actions when id parameters are not passed, so if you are using an identifier for a specific model, check that the identifier is in the parameter list and if you do not take alternative actions. for example, if you do not pass the account ID, then make sure that you are not trying to use it.
Your comment says that you already use shallow routes, but is that not what you posted in your question?
jamesc
source share