I have some destructive action to be performed, so I think it's Rails way to put such actions behind a PUT or POST (so link_to doesn't work because it only GETs).
I added a button like this:
<%= button_to "Acknowledge", ack_something_path, :method => :put, :confirm => "Sure?" %>
The button works (calls the correct action), but, I can't get Rails to show a "confirm" dialog box.
Any ideas how to do that ?
UPDATE (PROBLEM SOLVED)
I didn't mention that I was including jquery as well as prototype in HEAD
(didn't think it would matter). BUT, when I removed jquery, the confirmation dialog was displayed.
Don't know why this happens, but problem is solved (for now anyway). jquery and prototype do not like to work together it seems.