I was told about an issue today with the image_submit_tag not supporting the :confirm method on the element:
1 | <%= image_submit_tag('buttons/submit.gif', { :confirm => 'Are you sure?' }) %> |
so I thought I’d share a quick fix which would be the actual javascript returned by the function:
1 2 | <%= image_submit_tag('buttons/submit.gif', { :onclick => 'return confirm(\'Are you sure?\');' }) %> |
Hope this can save some people time…