# Question regarding routing

**URL:** <https://www.ruby-forum.com/t/question-regarding-routing/174468>\
**Category:** Rails\
**Created:** [August 27, 2009, 5:24am UTC](https://www.ruby-forum.com/t/question-regarding-routing/174468 "2009-08-27T05:24:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhruvasagar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@dhruvasagar](https://www.ruby-forum.com/u/dhruvasagar)\
**Post date:** [August 27, 2009, 5:24am UTC](https://www.ruby-forum.com/t/question-regarding-routing/174468/1 "2009-08-27T05:24:44Z")

</div>

Hi Everyone,  
I am developing a small web application using rails, in my controller I  
have  
added a function which is apart from the normal one’s that are supported  
by  
the default routes, hence to map this one as well I have the following  
route  
:

map.resources :controller, :collection =\> { :additional\_function =\> :get  
}

Now I am able to access this method just as I should, but I just wanted  
to  
know if there is some dynamic path construct that I can use for this  
method  
in my views.

To make my question more clear, eg.) if I have to use the path to the  
‘new’  
action I would use this : new\_controller\_path  
So what I want to know is if there is such a dynamic variable that I can  
use  
for the additional function that I declared, or do I always have to hard  
code it using a string ?

Thanks & Regards,  
Dhruva S…

Marie von  
Ebner-Eschenbach[http://www.brainyquote.com/quotes/authors/m/marie\_von\_ebnereschenbac.html](http://www.brainyquote.com/quotes/authors/m/marie_von_ebnereschenbac.html)

- “Even a stopped clock is right twice a day.”

---

<div class="post-metadata">

**Author:** ![dhruvasagar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4bbf92/32.png) [@dhruvasagar](https://www.ruby-forum.com/u/dhruvasagar)\
**Post date:** [August 27, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/question-regarding-routing/174468/2 "2009-08-27T16:50:48Z")

</div>

Wouldn’t it just be controller\_additional\_function\_path?

You can check by running rake routes
