Rails:路由:收集既是GET *又是* POST?

时间:2010-09-24 04:32:29

标签: ruby-on-rails collections post get routes

我的路线目前看起来像这样:

map.resources :regions, :collection => {:select_for_payroll => :get}, has_one => :payroll

如何让:select_for_payroll同时接受GET POST?

非常感谢!

MRM

1 个答案:

答案 0 :(得分:1)

我明白了!这里:

map.resources :regions, 
 :collection => {:select_for_payroll => [:get, :post]}, 
     has_one => :payroll