If you encounter same problem i have mine where :confirm does not work in:
<%= link_to “Delete”, location, ;confirm => “Are you sure?” %>
Solution:
1) Grab the jQuery driver at http://github.com/rails/jquery-ujs and put it in your javascripts directory. The file is at src/rails.js
2) Put these codes to your layout file:
= javascript_include_tag “http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js”
= javascript_include_tag ‘rails’
3) to authenticate ajax request from CSRF attack add this to your header :
<%= csrf_meta_tag %>
More information at: http://joshhuckabee.com/jquery-rails-3
