I want to do the following: admin/company_branches/:company_branch_id/:controller/:action/:id This basically will allow someone to go to: admin/company_branches/1/a_controller/a_action/23 and go to the controller: admin/company_branches/a_controller/a_action then send me the following params: params[:company_branch_id] = 1 params[:id] = 23 Any idea how I can accomplish this? I keep getting a routing error. Thanks for your help.
on 2007-01-31 20:24
on 2007-01-31 21:47
Ben Johnson wrote: > > Any idea how I can accomplish this? I keep getting a routing error. > > Thanks for your help. This worked how I wanted: map.connect 'admin/company_branches/:company_branch_id/details/:action/:id', :controller => 'admin/company_branches/details' The problem is that I have to do this for every controller under company branches. Isn't there an easier way to do this? So that I don't have ot make a route for every controller.