From f28340a5ef3dafd3f96e7032b6b21352ebd11f57 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Sat, 25 Oct 2014 16:13:58 -0700 Subject: [PATCH] :scissors: --- actionview/lib/action_view/helpers/form_tag_helper.rb | 3 +-- actionview/test/template/form_tag_helper_test.rb | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 74cfec962e..5aeb138f7a 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -133,13 +133,12 @@ module ActionView option_tags ||= "" html_name = (options[:multiple] == true && !name.to_s.ends_with?("[]")) ? "#{name}[]" : name - if options.include?(:include_blank) include_blank = options.delete(:include_blank) if include_blank == true include_blank = '' end - + option_tags = content_tag(:option, include_blank, :value => '').safe_concat(option_tags) end diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 4844398c13..e8170d43e1 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -231,7 +231,7 @@ class FormTagHelperTest < ActionView::TestCase expected = %() assert_dom_equal expected, actual end - + def test_select_tag_with_include_blank_string actual = select_tag "places", "".html_safe, :include_blank => 'Choose' expected = %()