he leído este artículo by James Buck, but it's a bit out of date.
Here's what I know is considered bad practice:
resources :companies do resources :users resources :roles resources :people do resources :notes end end
Is this what I should be doing?
resources :companies do resources :users, :roles, :people end resources :people do resources :notes end
And can someone please explain to me why or why not?
preguntado el 01 de febrero de 12 a las 04:02
Both will generate the exact routes for :companies , :users , :roles and for :people .
But :notes route will differ .
In first case for the :notes route will generate something like :
and in second case routes will not relate with companies , and looks like :
So I think its depend on your application and which routes you want to prefer .
Espero que esto ayude.