diff options
author | Eileen M. Uchitelle <eileencodes@users.noreply.github.com> | 2019-05-28 08:20:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-28 08:20:21 -0700 |
commit | 350ae29635c7e1e7a66a75e2d070259042ede3ea (patch) | |
tree | 679a84c90af608966784e7576c1540f206a8c85a /actionview/lib | |
parent | fc530d866809403ed9259028336db8103b00ac62 (diff) | |
parent | a4229a534ff237443b445de9aec0310c0f388b56 (diff) | |
download | rails-350ae29635c7e1e7a66a75e2d070259042ede3ea.tar.gz rails-350ae29635c7e1e7a66a75e2d070259042ede3ea.tar.bz2 rails-350ae29635c7e1e7a66a75e2d070259042ede3ea.zip |
Merge pull request #36324 from yoones/fix-unexpected-select-tag-delete-behavior
Fix unexpected select_tag delete behavior when include_blank is present
Diffstat (limited to 'actionview/lib')
-rw-r--r-- | actionview/lib/action_view/helpers/form_tag_helper.rb | 3 |
1 files changed, 2 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 5d4ff36425..c93ead9653 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -137,7 +137,8 @@ module ActionView html_name = (options[:multiple] == true && !name.to_s.ends_with?("[]")) ? "#{name}[]" : name if options.include?(:include_blank) - include_blank = options.delete(:include_blank) + include_blank = options[:include_blank] + options = options.except(:include_blank) options_for_blank_options_tag = { value: "" } if include_blank == true |