views:

65

answers:

1

I'm using Ruby on Rails with jQuery and trying 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?

+2  A: 

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

NM
I do use it. Include <%= javascript_include_tag 'jrails' %>in layout
Arty
The problem was that I had to restart Mongrel to make it work. Uh..
Arty