diff options
author | Younes SERRAJ <younes.serraj@gmail.com> | 2019-05-22 10:21:59 +0200 |
---|---|---|
committer | Younes SERRAJ <younes.serraj@gmail.com> | 2019-05-22 10:21:59 +0200 |
commit | a4229a534ff237443b445de9aec0310c0f388b56 (patch) | |
tree | ee46d4c995dd855c3bf2af2cd25f117ad22c3ce0 /actionview/lib | |
parent | a2708473b150b30a00c80d64f57a8c4b41a32fcc (diff) | |
download | rails-a4229a534ff237443b445de9aec0310c0f388b56.tar.gz rails-a4229a534ff237443b445de9aec0310c0f388b56.tar.bz2 rails-a4229a534ff237443b445de9aec0310c0f388b56.zip |
Fix select_tag so that is doesn't change options when include_blank is set
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 |