如何使用jQuery实现link_to_remote工作?Ajax并不是定义错误。

时间:2022-10-09 07:42:06

I'm using Ruby on Rails with jQuery and trying to do the following:

我使用Ruby on Rails和jQuery,并尝试做以下事情:

    <%= link_to_remote (image_tag("delete.png"),  :url => { :action => 'remove_candidate', :id => candidate }) %>

When I load a page and hit the link I get 'Ajax is not defined' error in FireBug console. I understand that it's because I didn't load prototype, but load jQuery libs instead, but how I should use it with jQuery then?

当我加载一个页面并点击链接时,我在FireBug控制台得到“Ajax未定义”错误。我知道这是因为我没有加载prototype,而是加载jQuery libs,但是我应该如何使用jQuery呢?

1 个解决方案

#1


3  

Use jrails . That will define all these helpers for you .

使用jrails。这将定义所有这些助手。

#1


3  

Use jrails . That will define all these helpers for you .

使用jrails。这将定义所有这些助手。