I want to call a javascript function that will be conditional upon a user's response to the confirm box.
For example, I have the following anchor:
<%= link_to 'Sign Out', destroy_session_path, confirm: 'Are you sure that you would like to sign out?', method: :delete %>
Should I just abandon the unobtrusive javascript and bind my own jQuery callback to my anchor?
Or is there some magical way to pass a callback function to the Rails url helper? I did not see any discussion of callbacks in the documentation.