# Passing Params to Resources via Routes

**URL:** <https://www.ruby-forum.com/t/passing-params-to-resources-via-routes/122827>\
**Category:** Rails\
**Created:** [December 12, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/passing-params-to-resources-via-routes/122827 "2007-12-12T17:51:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![sjmadsen](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/b3f665/32.png) [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Post date:** [December 12, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/passing-params-to-resources-via-routes/122827/1 "2007-12-12T17:51:46Z")

</div>

I am trying to do the following

map.with\_options :conditions =\> { :domain =\> XYZ\_DOMAIN }, :application  
=\> 6 do |xyz|  
xyz.site “/”, :controller =\> “xyz/site”, :action =\> “index”  
xyz.resources :things  
xyz.connect “:controller/:action/:id”, :controller =\> “site”,  
:action =\> “:index”  
end

I assign the :application parameter in the map.with\_options, this is  
passed to all map.connect style routes, but it will not pass to a  
resource. I attempted to do

xyz.resources :things, :application =\> 6

but no luck.

How can I pass a param based on the route to a resource?

Thanks
