开发者

How to get link_to_remote work with jQuery? Ajax is not defined error

开发者 https://www.devze.com 2023-01-07 00:03 出处:网络
I\'m using Ruby on Rails with jQuery and tr开发者_Python百科ying to do the following: <%= link_to_remote (image_tag(\"delete.png\"),:url => { :action => \'remove_candidate\', :id => candi

I'm using Ruby on Rails with jQuery and tr开发者_Python百科ying to do the following:

    <%= 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?


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

0

精彩评论

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