# Addind a default value to a restful route

**URL:** <https://www.ruby-forum.com/t/addind-a-default-value-to-a-restful-route/112269>\
**Category:** Rails\
**Created:** [August 16, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/addind-a-default-value-to-a-restful-route/112269 "2007-08-16T23:18:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ryan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/a8b319/32.png) [@ryan](https://www.ruby-forum.com/u/ryan)\
**Post date:** [August 16, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/addind-a-default-value-to-a-restful-route/112269/1 "2007-08-16T23:18:20Z")

</div>

map.resources :trackables  
map.resources :activities, :controller =\> ‘trackables’

I want my trackables\_controller to handle activities request. The  
above accomplishes the route, but does not allow for the  
trackables\_controller to distinguish between the type types of  
requests.

Regular routes allow you to use tack on another value like:

map.connect “activities”, :controller =\> ‘trackables’, :action =\>  
‘index’, :activity =\> true

which will allow you to reference params[:activity] in the  
trackables\_controller.

I have not found a way to do this with map.resources.

Ryan
