Premise:
Usually during preparation of a new Ruby on Rails App, I draw out models and relations regarding user navigations. Usually I hit a place where I need to ask myself, whether or not I should go beyond the usual "rule of thumb" of nesting no more 1 level deep. Sometimes I feel the need to nest, rather than creating another namespace route and duplicating work.
Here's an example:
Models: User, Company, Location
User has and belongs to many Companies (many to many)
User has and belongs to many Locations (many to many)
Company has and belongs to many Locations (many to many)
Routes:
1 level nesting
users/:user_id/companies/ - list all companies related to a user
users/:user_id/locations/ - list all locations related to a user
more than 1 level nesting
users/:user_id/companies/:company_id/locations/ - list all company-locations of a user
So, my question is whether or not it is appropriate to nest more than 1 level deep in RoR? Yes or no? And why?