diff --git a/lib/haml/helpers/action_view_mods.rb b/lib/haml/helpers/action_view_mods.rb index 30ca9d7a..901987db 100644 --- a/lib/haml/helpers/action_view_mods.rb +++ b/lib/haml/helpers/action_view_mods.rb @@ -61,6 +61,12 @@ if defined?(ActionView) and not defined?(Merb::Plugins) end alias_method :form_tag_without_haml, :form_tag alias_method :form_tag, :form_tag_with_haml + + def text_area_tag_with_haml(*args) + preserve text_area_tag_without_haml(*args) + end + alias_method :text_area_tag_without_haml, :text_area_tag + alias_method :text_area_tag, :text_area_tag_with_haml end module FormHelper diff --git a/test/haml/helper_test.rb b/test/haml/helper_test.rb index 0150588f..467e5d92 100644 --- a/test/haml/helper_test.rb +++ b/test/haml/helper_test.rb @@ -85,6 +85,11 @@ class HelperTest < Test::Unit::TestCase should_be = "
\n

bar

\n baz\n
\n" assert_equal(should_be, result) end + + def test_text_area_tag + assert_equal("\n", + render('= text_area_tag "body", "Foo\nBar\n Baz\n Boom"', :action_view)) + end def test_capture_haml assert_equal("\"

13

\\n\"\n", render("- foo = capture_haml(13) do |a|\n %p= a\n= foo.dump"))