rhodes369/rhodes-ror — pull request #20 by doktorj (2012-05-30 18:56:00+00:00)
Title: finally resolved multi-issue with admin delete image confirmations not showing/firing properly

after going thru many of the examples via the rails api docs:
http://apidock.com/rails/v3.2.3/ActionView/Helpers/UrlHelper/link_to
i got the confirmation popping up in combo with ephs removeImag class and
data attributes hash, but then ran into another issue of it all working/deleting,
but if you hit the cancel on confirmation popup, it would still delete the image.

and finally looking found this solution on stackoverflow:
http://stackoverflow.com/questions/1234432/rails-destroy-confirm-with-jquery-ajax

which involved removing the rails link_to :confirm code and adding this to the
.removeImg click listener in the materials.js.coffee file

return false unless confirm("Are you sure you want to remove this image?")

strange, but it seems clean and works