开发者

Rails: Route for :collection that is both GET *and* POST?

开发者 https://www.devze.com 2023-01-17 15:15 出处:网络
I have a route that currently looks like this: map.resources :regions, :collection => {:select_for_payroll => :get}, has_one => :payroll

I have a route that currently looks like this:

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

How can I make the :select_for_payroll take both GET and POST?

Many 开发者_如何学JAVAthanks!

MrM


I got it! Here:

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

精彩评论

暂无评论...
验证码 换一张
取 消