diff options
author | Bogdan Gusiev <agresso@gmail.com> | 2014-08-05 17:23:00 +0300 |
---|---|---|
committer | Bogdan Gusiev <agresso@gmail.com> | 2014-08-05 17:23:00 +0300 |
commit | 7a0c2ba48b0145e5031e51d316407ba28d769905 (patch) | |
tree | 5b578beaac65240990ff71ca88b01bbe76e37ac1 /actionview/test | |
parent | 3300fdedc748993b378288c6cbc3113885c955ed (diff) | |
download | rails-7a0c2ba48b0145e5031e51d316407ba28d769905.tar.gz rails-7a0c2ba48b0145e5031e51d316407ba28d769905.tar.bz2 rails-7a0c2ba48b0145e5031e51d316407ba28d769905.zip |
Fixed #select form builder helper to support block with html output
Diffstat (limited to 'actionview/test')
-rw-r--r-- | actionview/test/template/form_options_helper_test.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb index fbafb7aa08..d25fa3706f 100644 --- a/actionview/test/template/form_options_helper_test.rb +++ b/actionview/test/template/form_options_helper_test.rb @@ -591,6 +591,19 @@ class FormOptionsHelperTest < ActionView::TestCase ) end + def test_select_under_fields_for_with_block_without_options + @post = Post.new + + output_buffer = fields_for :post, @post do |f| + concat(f.select(:category) {}) + end + + assert_dom_equal( + "<select id=\"post_category\" name=\"post[category]\"></select>", + output_buffer + ) + end + def test_select_with_multiple_to_add_hidden_input output_buffer = select(:post, :category, "", {}, :multiple => true) assert_dom_equal( |