views:

34

answers:

1

i'm trying to have the following structure

get  /something/id/apply => controller 1
post /something/id/apply => controller 2

is there an easy way to accomplish this in rails 2.x? right now i'm resorting to manually checking the http method in the controller code, and that seems... fugly.

+2  A: 
  map.match '/something/:id/apply', :method => :get, :controller => 'controller1'
  map.match '/something/:id/apply', :method => :post, :controller => 'controller2'
shingara
you mean controller 1 and 2?
kolosy
Yes, but he has the correct method, just needs to cleanup his copy/pasting :)
Sean
Yes I clean with controller 2 in second line
shingara