I have two resources:
resources :users do
resources :cars
end
The association is:
- A user can have many cars
- A car belongs to a user
When doing that kind of nested resourcing, I get urls like:
/users/:id/cars/new
My question is:
If it makes more sense to do just /cars/new
(without the /users/:id) because I get the :id
from the current_user logged in, how would I solve that in the routes?