This tag with rails 3
<%= link_to \'Destroy\', item, :method => :delete,:confirm=>\'Are you sure?\' %>
produces this html
In my case jQuery was loaded twice because of the line
//= require_tree .
To prevent this error in application.js and application.css I'm used to create a subdirectory app/assets/javascript/autorequire and instead of require_tree . I do require_tree ./autorequire.
So, files in app/assets/javascript and app/assets/stylesheets are not included automatically/accidentally anymore. I put all my individual .css and .js files into the subdirectory and they are included implicitly. But I can define which files from the top-path are to be included and in which order.
Since I do so, I never had troubles by assets not loaded as I expect them to be.