# Frustrations with routing

**URL:** <https://www.ruby-forum.com/t/frustrations-with-routing/112364>\
**Category:** Rails\
**Created:** [August 17, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364 "2007-08-17T22:59:41Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![cidol](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@cidol](https://www.ruby-forum.com/u/cidol)\
**Post date:** [August 17, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364/1 "2007-08-17T22:59:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![cidol](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@cidol](https://www.ruby-forum.com/u/cidol)\
**Post date:** [August 17, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364/2 "2007-08-17T23:27:48Z")

</div>

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. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

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

–  
[http://www.jeremymcanally.com/](http://www.jeremymcanally.com/)

My free Ruby e-book:  
[http://www.humblelittlerubybook.com/book/](http://www.humblelittlerubybook.com/book/)

My blogs:

> **[Site not found · DreamHost](http://www.mrneighborly.com/)**
>
> The owner of this domain has not yet uploaded their website.

[http://www.rubyinpractice.com/](http://www.rubyinpractice.com/)

---

<div class="post-metadata">

**Author:** ![cidol](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@cidol](https://www.ruby-forum.com/u/cidol)\
**Post date:** [August 17, 2007, 11:57pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364/3 "2007-08-17T23:57:50Z")

</div>

Holy wow! I like the look of makes\_resourceful.

Thanks.

On Aug 17, 4:26 pm, “Jeremy McAnally” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![cidol](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@cidol](https://www.ruby-forum.com/u/cidol)\
**Post date:** [August 21, 2007, 8:47pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364/4 "2007-08-21T20:47:39Z")

</div>

Yeah, it is.

And it is wonderful.

---

<div class="post-metadata">

**Author:** ![cidol](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/54ee81/32.png) [@cidol](https://www.ruby-forum.com/u/cidol)\
**Post date:** [August 18, 2007, 12:52pm UTC](https://www.ruby-forum.com/t/frustrations-with-routing/112364/5 "2007-08-18T12:52:46Z")

</div>

> Holy wow! I like the look of makes\_resourceful.

Isn’t it make\_resourceful ?

Wybo
