diff options
author | Justin Schiff <AmbientRevolution@gmail.com> | 2015-08-05 09:38:43 -0700 |
---|---|---|
committer | Justin Schiff <AmbientRevolution@gmail.com> | 2015-08-11 16:35:10 -0700 |
commit | 3822a322a82a19a9341a21a0cb1e36653da09c46 (patch) | |
tree | 1933f46f1facf23bf51b586b65057441e4f88271 /guides/source | |
parent | e69364bc2da0cd5cabe3f01a8dce27ac841a3a2b (diff) | |
download | rails-3822a322a82a19a9341a21a0cb1e36653da09c46.tar.gz rails-3822a322a82a19a9341a21a0cb1e36653da09c46.tar.bz2 rails-3822a322a82a19a9341a21a0cb1e36653da09c46.zip |
Make disable_with default in submit_tag
Prevents double submission by making disable_with the default.
Default disable_with option will only be applied if user has not
specified her/his own disable_with option, whether that is in the
`data-disable-with` string form or the
`:data => { :disable_with => "Saving..." }` hash form. disable_with
will default to the value attribute.
A configuration option was added to opt out of this functionality if
the user so desires.
`config.action_view.automatically_disable_submit_tag = false`
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/configuring.md | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/guides/source/configuring.md b/guides/source/configuring.md index 47c275609e..df9704830e 100644 --- a/guides/source/configuring.md +++ b/guides/source/configuring.md @@ -451,6 +451,9 @@ encrypted cookies salt value. Defaults to `'signed encrypted cookie'`. * `config.action_view.raise_on_missing_translations` determines whether an error should be raised for missing translations. +* `config.action_view.automatically_disable_submit_tag` determines whether + submit_tag should automatically disable on click, this defaults to true. + ### Configuring Action Mailer There are a number of settings available on `config.action_mailer`: |