diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 51b4135886..a7fa597c89 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -103,7 +103,7 @@ * Fixed that setting the :host option in url_for would automatically turn off :only_path (since :host would otherwise not be shown) #9586 [Bounga] -* Added FormHelper#label #8641 [jcoglan] +* Added FormHelper#label. #8641, #9850 [jcoglan, jarkko] * Added AtomFeedHelper (slightly improved from the atom_feed_helper plugin) [DHH] diff --git a/actionpack/test/template/form_helper_test.rb b/actionpack/test/template/form_helper_test.rb index f37469954a..fa53f6ae1a 100644 --- a/actionpack/test/template/form_helper_test.rb +++ b/actionpack/test/template/form_helper_test.rb @@ -272,6 +272,10 @@ class FormHelperTest < Test::Unit::TestCase def test_auto_index pid = @post.id + assert_dom_equal( + "", + label("post[]", "title") + ) assert_dom_equal( "", text_field("post[]","title") ) @@ -361,6 +365,7 @@ class FormHelperTest < Test::Unit::TestCase _erbout = '' form_for("post[]", @post) do |f| + _erbout.concat f.label(:title) _erbout.concat f.text_field(:title) _erbout.concat f.text_area(:body) _erbout.concat f.check_box(:secret) @@ -368,6 +373,7 @@ class FormHelperTest < Test::Unit::TestCase expected = "