Ruby on Rails: image_submit_tag and :confirm

I was told about an issue today with the image_submit_tag not supporting the :confirm method on the element:

so I thought I’d share a quick fix which would be the actual javascript returned by the function:

Hope this can save some people time…