Good notes posted by barnaclebarnes

RSS feed
October 29, 2008
3 thanks

A work-around for adding confirmation to image_submit_tag

Sometimes you may want to add a confirmation to image submit tags but this function does not allow it. To get over this limitation use a normal submit tag and set the src and type properties (set type to “image”)

Code example

submit_tag “Delete”, :confirm => “Are you sure?”, :src => “/images/trash.png”, :type => “image” %>