diff options
author | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2015-09-18 12:44:09 +0530 |
---|---|---|
committer | Akshay Vishnoi <akshay.vishnoi@vinsol.com> | 2015-09-18 12:44:09 +0530 |
commit | 9331f00229205c3a018af92cb50907d4fc87ecdc (patch) | |
tree | 1c456ad15779e668dfcffc57b5ab0e112e70c667 /actionview/lib/action_view/helpers | |
parent | 95593f0419b1ab2e2ace5ed971204d74c10ac2fb (diff) | |
download | rails-9331f00229205c3a018af92cb50907d4fc87ecdc.tar.gz rails-9331f00229205c3a018af92cb50907d4fc87ecdc.tar.bz2 rails-9331f00229205c3a018af92cb50907d4fc87ecdc.zip |
Fix - Prevent adding of `data-disable-with` option twice in html.
Earlier
when `data-disable-with` option is added direclty as in options then
```ruby
submit_tag("Save", { "data-disable-with" => "Processing..." })
# => <input type="submit" name="commit" value="Save" data-disable-with="Processing..." data-disable-with="Processing..." />
```
Now
when `data-disable-with` option is added direclty as in options then
```ruby
submit_tag("Save", { "data-disable-with" => "Processing..." })
# => <input type="submit" name="commit" value="Save" data-disable-with="Processing..." />
```
Diffstat (limited to 'actionview/lib/action_view/helpers')
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index af684e05c6..0e8127e29e 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -450,9 +450,9 @@ module ActionView disable_with_text ||= value.clone tag_options.deep_merge!("data" => { "disable_with" => disable_with_text }) else - tag_options.delete("data-disable-with") tag_options["data"].delete(:disable_with) if tag_options["data"] end + tag_options.delete("data-disable-with") end tag :input, tag_options |