且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么不从视图中调用我的控制器

更新时间:2021-12-27 22:27:38

这对很多人都有用反复试验的结果:

This worked for me after lots of trial and error:

<%= button_to'Vote',request_upvote_path(request_id:request.id),remote:true,方法: :post,onclick: upvote(#{request.id})%>