# Re: Restful Route for a custom action

**URL:** <https://www.ruby-forum.com/t/re-restful-route-for-a-custom-action/124412>\
**Category:** Rails\
**Created:** [December 28, 2007, 2:14pm UTC](https://www.ruby-forum.com/t/re-restful-route-for-a-custom-action/124412 "2007-12-28T14:14:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [December 28, 2007, 2:14pm UTC](https://www.ruby-forum.com/t/re-restful-route-for-a-custom-action/124412/1 "2007-12-28T14:14:18Z")

</div>

I’m using rails 2.0.2 and yes, I have restarted the server.

What version of Rails?

On Dec 28, 2007 3:10 PM, Mark W. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

On Dec 27, 7:21pm, Mark [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> This is the code in my routes.rb  
> map.resources :leagues  
> map.resources :leagues, :collection =\> {:old =\> :get}

You restarted the server after changing routes.rb, right? No, of  
course you did. Never mind.

///ark

---

<div class="post-metadata">

**Author:** ![mslagell](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/e274bd/32.png) [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Post date:** [December 28, 2007, 5:21pm UTC](https://www.ruby-forum.com/t/re-restful-route-for-a-custom-action/124412/2 "2007-12-28T17:21:46Z")

</div>

Mark,

The issue is that you do not need to state the routes twice.

map.resources :leagues, :collections =\> {:old =\> :get}

is all you need. It will setup the normal restful routes and the  
additional  
“old” route. By having  
the route without the collection in front of it you are overiding the  
behavior of the second route.  
Simply remove the first route and it should work.

–Tim
