# Polymorphic URL's and Uncountable Resources

**URL:** <https://www.ruby-forum.com/t/polymorphic-urls-and-uncountable-resources/163426>\
**Category:** Rails\
**Created:** [March 20, 2009, 9:05am UTC](https://www.ruby-forum.com/t/polymorphic-urls-and-uncountable-resources/163426 "2009-03-20T09:05:28Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![spike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@spike](https://www.ruby-forum.com/u/spike)\
**Post date:** [March 20, 2009, 9:05am UTC](https://www.ruby-forum.com/t/polymorphic-urls-and-uncountable-resources/163426/1 "2009-03-20T09:05:28Z")

</div>

Hi everyone, I’ve noticed an inconsistency in the way rails deals with  
uncountable resources and restful routes.

Basically if you map an uncountable resource rails will append  
‘\_index’ to the end of some routes to avoid route clashes between the  
routes that deal with singular resources and plural resources. That’s  
all fine but on the other end, with the polymorphic path generator, it  
doesn’t generate the correct path. using form\_for [@podcast\_series]  
generates something like podcast\_series\_path. If called from a form it  
should be smart enough to realise that we want the update path and  
call podcast\_series\_index\_path.

Has anyone else come up against it? I’m not savvy enough to write a  
patch for rails so how do I get this investigated? Does anyone have a  
solution?

Cheers,

Brendon

---

<div class="post-metadata">

**Author:** ![spike](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/8797f3/32.png) [@spike](https://www.ruby-forum.com/u/spike)\
**Post date:** [January 12, 2010, 8:20pm UTC](https://www.ruby-forum.com/t/polymorphic-urls-and-uncountable-resources/163426/2 "2010-01-12T20:20:35Z")

</div>

Brendon M. wrote:

> Hi everyone, I’ve noticed an inconsistency in the way rails deals with  
> uncountable resources and restful routes.
> 
> Basically if you map an uncountable resource rails will append  
> ‘\_index’ to the end of some routes to avoid route clashes between the  
> routes that deal with singular resources and plural resources. That’s  
> all fine but on the other end, with the polymorphic path generator, it  
> doesn’t generate the correct path. using form\_for [@podcast\_series]  
> generates something like podcast\_series\_path. If called from a form it  
> should be smart enough to realise that we want the update path and  
> call podcast\_series\_index\_path.
> 
> Has anyone else come up against it? I’m not savvy enough to write a  
> patch for rails so how do I get this investigated? Does anyone have a  
> solution?
> 
> Cheers,
> 
> Brendon

I noticed that this bug is still resides in Rails. Is there a path for  
this problem? How did you fix it?
