cidol
1
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.
cidol
2
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
On 8/17/07, Collin M. [email protected] wrote:
Lord this gets my goat and jives my Johnson the wrong way.
–
http://www.jeremymcanally.com/
My free Ruby e-book:
http://www.humblelittlerubybook.com/book/
My blogs:
http://www.rubyinpractice.com/
cidol
3
Holy wow! I like the look of makes_resourceful.
Thanks.
On Aug 17, 4:26 pm, “Jeremy McAnally” [email protected]
cidol
5
Holy wow! I like the look of makes_resourceful.
Isn’t it make_resourceful ?
Wybo