Rails – How to put a confirmation popup on a f.submit?

You want <%= f.submit :confirm => 'Your confirm message' %>. Just FYI, this is just the short hand for the javascript call.

Edit:
As stated in other answers, the new way to have a popup confirm is:

<%= f.submit 'Save', data: { confirm: 'Your confirm message' } %>

Leave a Comment