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.

Have you taken a look at makes_resourceful? Even if you don't use the plugin itself, you can nick its code for things like the current_object method.

--Jeremy

Holy wow! I like the look of makes_resourceful.

Thanks.

Holy wow! I like the look of makes_resourceful.

Isn't it make_resourceful ?

Wybo

Yeah, it is.

And it is wonderful.