Frustrations with routing

Lets say I’ve got this mapped out

map.resources :owners do |owners|
owners.resources :possessions

This gives me routes looking like this:

…/owners/:id/
…/owners/:owner_id/possessions/:id/

I’m very frustrated that the routes do not look like this:

…/owners/:owner_id/
…/owners/:owner_id/possessions/:possession_id/

This causes problems when I want to share code between these
controllers that uses either.

params[:id] <-- meaning the id of the owner
params[:owner_id]

Lord this gets my goat and jives my Johnson the wrong way.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs