I've had to do something like this before. Basically what we did was we used javascript to change the value of a hidden tag.
Basically you set up ids for the submit buttons and you put in an onClick event. We typically use JQuery, I assume you are too since rails comes with it packaged it most of the time. But basically within your document.ready() when they on click the delete button, I set the value of my hidden tag to "delete" and when they click the analyze button I set the value of the hidden tag to "analyze". Then in your controller when it comes in just check the value of hte parameter for the name of the hidden tag. Easier explained than coded... but it turns out I was editing that file right now so you can take a look:
<script>
jQuery(document).ready(function()
{
$('#unassign_button').click(function()
{
$('#action').val("unassign");
$('#action_form').submit();
});
$('#add_button').click(function()
{
$('#action').val("add");
$('#action_form').submit();
});
});
</script>
That is the javascript snippet I am using. I have a hidden tag with id action and a two buttons one with id unassign_button and the other with add_button. The action_form is the id of my form so that I can submit it.
The issue with having two submit buttons is they do not hold a value to send a parameter and they both submit the same form to the same URL so you need some sort of input tag to carry the value of which button was clicked.
I typically just write the button in HTML rather than with ruby tags since I typically will just submit the form from the javascript at that point as well -- the buttons are just decorative at that point and its easier for the HTMl guy to style them without the ruby so my buttons and hidden tag look like:
<%= hidden_tag :action, "", :id=>"action" %>
<button class="add_button" id="add_button">Add</button>
<button class="unassign_button" id="unassign_button">Unassign</button>
and in the controller I just look at params[:action] to see which button they clicked.
EDITED:
I just found this:
Parameters: {"utf8"=>"✓", "authenticity_token"=>"3lIUwiKQG8hoYXIkPS9RU4GANGR0yGpJkAAyg2WTD0U=", "short_code"=>"tsCe0yFiWL", "commit"=>"Launch", "remote"=>"true"}
which means you can look at the commit param to see which button they clicked...