From 3822a322a82a19a9341a21a0cb1e36653da09c46 Mon Sep 17 00:00:00 2001 From: Justin Schiff Date: Wed, 5 Aug 2015 09:38:43 -0700 Subject: 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` --- guides/source/configuring.md | 3 +++ 1 file changed, 3 insertions(+) (limited to 'guides/source/configuring.md') 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`: -- cgit v1.2.3