When i use button_to or link_to, i can easily request a confirmation
dialog with (for example)
<%= button_to “Delete this story”,
{ :controller => “story”, :action => “delete”, :id => @story.id },
:confirm => “Delete story: are you sure?” %>
I also want to do this for the submit buttons on my forms, which are
“submit_tag” rather than “button_to”. But it doesn’t seem to be
possible, looking at the submit_tag source or trying it in my code
(unless i’m just being dumb).