开发者

How to accept a put request in rails

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜