开发者

How to accept a put request in rails

开发者 https://www.devze.com 2023-01-19 05:43 出处:网络
I am trying to build a survey app in rails 3. Basically I need to make a wa yi to ac开发者_Go百科cept responses from a set of questions. (surveys have many questions and responses.) I got it to render

I am trying to build a survey app in rails 3. Basically I need to make a wa yi to ac开发者_Go百科cept responses from a set of questions. (surveys have many questions and responses.) I got it to render but when I submit it it sends as a put instead of a post. So is there any way I can add a custom put route to my response controller?


# routes.rb
put '/surveys/:id' => 'surveys#update'

Assumes SurveysController has method update.

0

精彩评论

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