method
submit_tag
v1.1.6 -
Show latest stable
- Class:
ActionView::Helpers::FormTagHelper
submit_tag(value = "Save changes", options = {})public
Creates a submit button with the text value as the caption. If options contains a pair with the key of "disable_with", then the value will be used to rename a disabled version of the submit button.
3Notes
:disable_with is deprecated
Or you can use this way:
<%= submit_tag "Login", data: { disable_with: "Please wait.." } %>
:disable_with is deprecated
Since version 3.2.5 you should not use :disable_with.
Use this: <%= submit_tag "Login", 'data-disable-with' => "Please wait.." %>
Have submit_tag send value as a nested resource
To have the submit_tag send it's value within a nested resource for strong params use the name paramter.
submit_tag("Send", name: 'article[submit]')