:confirm option in Rails being ignored.

Posted by peehskcalba on Stack Overflow See other posts from Stack Overflow or by peehskcalba
Published on 2010-05-21T04:23:42Z Indexed on 2010/05/21 4:30 UTC
Read the original article Hit count: 206

Filed under:
|

I've got a table of projects in my Rails app, each with a delete link, like so:

<%= link_to "Delete", project, :confirm => "Are you sure?", :method => :delete %>

However, the delete request is sent even if the user clicks "Cancel" on the dialog box.

Any ideas on how to fix this?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about JavaScript