From d611036c7709d7c30cbab3110e20e248283af364 Mon Sep 17 00:00:00 2001 From: Frank Groeneveld Date: Fri, 17 Oct 2014 08:21:56 +0200 Subject: Use include_blank value as option label Update select_tag to reflect documentation and behave the same as form builder select. If the value of include_blank is not boolean true, use that value as the option label. --- actionview/test/template/form_tag_helper_test.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionview/test') diff --git a/actionview/test/template/form_tag_helper_test.rb b/actionview/test/template/form_tag_helper_test.rb index 771e3fefc3..5b9c1948db 100644 --- a/actionview/test/template/form_tag_helper_test.rb +++ b/actionview/test/template/form_tag_helper_test.rb @@ -224,6 +224,12 @@ 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 = %() + assert_dom_equal expected, actual + end def test_select_tag_with_prompt actual = select_tag "places", "".html_safe, :prompt => "string" -- cgit v1.2.3