鉴于button_to_remote
,这可能吗?函数似乎被定义为原型(prototype)助手?我已经更换了我的/public/javascripts/rails.js
使用 jQuery 驱动程序。
当我尝试使用button_to_remote
时我收到错误 undefined method 'button_to_remote' for #<#<Class:0x000001078d7090>:0x0000010789ad20>
如果这不可能使用 button_to_remote
,我如何使用 jQuery + Rails 3 完成同样的事情。
最佳答案
试试这个:
<%= button_to "Do Something",
{ :controller => :somecontroller, :action=> :something },
{ :remote => true }
%>
关于jquery - 使用 jQuery 和 Rails 3 的 button_to_remote,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3277314/