rails POST 请求中名为 "commit" 的参数的 function/meaning 是什么?

What's the function/meaning of the param named "commit" in a rails POST request?

rails POST 请求中名为 "commit" 的参数的 function/meaning 是什么?

<ActionController::Parameters {"utf8"=>"✓", "user"=>{"email"=>"admin@example.com", "password"=>"password", "password_confirmation"=>"password"}, "commit"=>"Register", "controller"=>"users/registrations", "action"=>"create"} permitted: false>

params[:commit] 保存提交按钮的值,如果您对多个操作使用相同的表单,如 'Sign up' 或 'Sign in' 或类似的东西,这将很有用行。