使用jQuery和Rails 3从按钮到远程按钮
如果使用jQuery和Rails 3从按钮到远程按钮,jquery,ajax,ruby-on-rails-3,prototypejs,Jquery,Ajax,Ruby On Rails 3,Prototypejs,如果按钮_to_remote功能似乎被定义为原型帮助器,这是否可能?我已经用jQuery驱动程序替换了我的/public/javascripts/rails.js 当我尝试使用button\u to\u remote时,我得到了错误未定义的方法“button\u to\u remote” 如果使用按钮到远程无法做到这一点,我如何使用jQuery+Rails 3完成同样的事情。试试以下方法: <%= button_to "Do Something", { :co
按钮_to_remote
功能似乎被定义为原型帮助器,这是否可能?我已经用jQuery驱动程序替换了我的/public/javascripts/rails.js
当我尝试使用button\u to\u remote
时,我得到了错误未定义的方法“button\u to\u remote”
如果使用按钮到远程无法做到这一点,我如何使用jQuery+Rails 3完成同样的事情。试试以下方法:
<%= button_to "Do Something",
{ :controller => :somecontroller, :action=> :something },
{ :remote => true }
%>
:somecontroller,:action=>:someone},
{:remote=>true}
%>
谢谢。如何指定响应该操作的控制器?我将此标记为答案,尽管我尚未对其进行测试;)