We were wondering with a colleague: What’s the reason for generating an element instead of a element in the submit_tag ? The button is a richer element that allows us to have text that’s different from the value that’s being submitted. So we can do something like:
<button type='submit' value='foo'>Submit</button>
<input type='submit' value='foo'>
This allows us to write a switch case based on the
params[:commit] that’s independent of the language that the submit button is in, i.e. if we’ve internationalized the form, the submit button generated as an input element would have a different value where as the if it’s generated as a button only the text would be different, but the value would be the same as in any other language.