Passing Params to Resources via Routes

0 views
Skip to first unread message

Steve Martocci

unread,
Dec 12, 2007, 11:51:46 AM12/12/07
to rubyonra...@googlegroups.com
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
--
Posted via http://www.ruby-forum.com/.

Reply all
Reply to author
Forward
0 new messages