<%=link_to 'Add note', {:controller => 'home', :action => 'add_note', :id =>user.id}, :remote => true%> After click on this link is called the page _add_note.html.erb (via JS add_note.js.erb). This file looks this:
$('div#ajax_div').html("<%= escape_javascript(render('add_note')) %>"); It looks good, after click on the link above is loaded to the ajax_div a content of the file _add_note.html.erb.
But the problem is, that after click on the link I see in Firebug, that the ajax call is processed twice.
GET /home/add_note?id=39 200 OK 601ms GET /home/add_note?id=39 200 OK 1154ms How it is possible? What could be wrong?
Gemfile. But unfortunately, if all you're seeing for javascript includes are those two files, it probably isn't an issue of any handler being included 2x.