# Additional params arguments through routes.rb

**URL:** <https://www.ruby-forum.com/t/additional-params-arguments-through-routes-rb/180878>\
**Category:** Rails\
**Created:** [December 30, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/additional-params-arguments-through-routes-rb/180878 "2009-12-30T23:49:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chrisfinne](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/f1d935/32.png) [@chrisfinne](https://www.ruby-forum.com/u/chrisfinne)\
**Post date:** [December 30, 2009, 11:49pm UTC](https://www.ruby-forum.com/t/additional-params-arguments-through-routes-rb/180878/1 "2009-12-30T23:49:56Z")

</div>

I have a controller that I’d like to exist under two different URIs –  
call it a tags controller, mapped to /tags and /my\_profile/tags …  
the second URI is connected as a singleton resource. The only  
difference between the two is the starting place for the find calls; /  
tags finds all tags in the system, /my\_profile/tags just finds _my_  
tags.

Because the nesting is under a singleton resource, there’s no  
additional param ID to key off of, so I’d have to provide one of my  
own.

In the old days of map.connect, it was trivial to add an additional  
item to the params hash:

map.connect ‘/my\_profile/tags’, :controller =\> ‘tags’, :action =\>  
‘index’, :current\_user =\> true  
map.connect ‘/tags’, :controller =\> ‘tags’, :action =\>  
‘index’, :current\_user =\> false

I can’t for the life of me find a way to pass that extra parameter in  
using map.resources anymore. Am I missing something?

–

You received this message because you are subscribed to the Google  
Groups “Ruby on Rails: Talk” group.  
To post to this group, send email to removed\_email\_address@domain.invalid.  
To unsubscribe from this group, send email to  
removed\_email\_address@domain.invalid.  
For more options, visit this group at  
[http://groups.google.com/group/rubyonrails-talk?hl=en](http://groups.google.com/group/rubyonrails-talk?hl=en).
