I wanted to add confirmation message on link_to function with Ruby.
= link_to \'Reset message\', :action=>\'reset\' ,:confirm=>\'Are you sure?\'
watch this railscasts video for better understanding.
http://railscasts.com/episodes/205-unobtrusive-javascript
rails documentation for link_to helper.
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to