Params Includes Submission Button Info
When a form is submitted for a Rails app, the respective controller action
will have access to a variety of information in the
params hash. Included
is an entry with the name and value of the button that submitted the form.
By default, Rails will give the name
commit to a submission button.
<%= f.submit %> # results in: <input type="submit" name="commit" value="Submit">Submit</input>
create action will have parameters that include that
submission button's info:
# in create action > params['commit'] => 'Submit'