# RESTful Routes and Polymorphic Paths

**URL:** <https://www.ruby-forum.com/t/restful-routes-and-polymorphic-paths/136995>\
**Category:** Rails\
**Created:** [May 8, 2008, 1:14am UTC](https://www.ruby-forum.com/t/restful-routes-and-polymorphic-paths/136995 "2008-05-08T01:14:37Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![tamuski](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/6de8d8/32.png) [@tamuski](https://www.ruby-forum.com/u/tamuski)\
**Post date:** [May 8, 2008, 1:14am UTC](https://www.ruby-forum.com/t/restful-routes-and-polymorphic-paths/136995/1 "2008-05-08T01:14:37Z")

</div>

I am a newbie. I will describe what I have observed. Perhaps some  
kind soul will explain to me what is happening.

I need to pass a url parameter with a route. I find that this is  
easily accomplished with a named nested route such as:

link\_to admin\_group\_group\_rpin\_path(@group,  
group\_rpin, :as\_of\_date=\>@group.as\_of\_date

However, when I try:

link\_to [:admin,@group,group\_rpin],:as\_of\_date=\>@group.as\_of\_date

I find that the url parameter is not passed.

I know that I can pass a url parameter via

send("#{role}\_group\_group\_rpin\_path", @group,  
group\_rpin, :as\_of\_date=\>@group.as\_of\_date)

to achieve the result of having the namespace be paramiterized and  
also pass a url parameter, but it would be good to be able to do the  
same thing with a polymorphic path.

Is this a bug or a feature?

Thanks, …
