As per the rails docs, using the submit_tag
helper will generate something like
submit_tag
# => <input name="commit" type="submit" value="Save changes" />
It includes the property name="commit"
Why does this get included? Is it some sort of standard? Trying to understand what "commit" means in this context
I noticed it gets included in the
params
inside the controller after hitting submit. Was this changed recently? I thought only url params and POST/PUT data get included?@params
=> {"utf8"=>"✓", "authenticity_token"=>"4q3u+mfMi57YbchTAzaCI7WHmzfZJrLbTZ17aVwfq9uw8aMU1B3PBR13qfipgN6lbRoi0dywFU9i1AbJ0GP7UA==", "email"=>"foo@example.co", "password"=>"(REDACTED)", "dest"=>"", "commit"=>"Log in", "controller"=>"sessions", "action"=>"log_in"}
Thanks!