1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Rails 4 does not render default cols and rows options for textarea

see: https://github.com/rails/rails/commit/3384ee2
This commit is contained in:
Akira Matsuda 2013-02-07 16:35:56 +09:00 committed by Norman Clarke
parent 83ef8b20c8
commit f20d64ede0

View file

@ -132,7 +132,18 @@ HTML
HAML
end
if ((ActionPack::VERSION::MAJOR == 3) && (ActionPack::VERSION::MINOR >= 2) && (ActionPack::VERSION::TINY >= 3) || (ActionPack::VERSION::MAJOR == 4))
if ActionPack::VERSION::MAJOR == 4
def test_text_area
assert_equal(%(<textarea id="body" name="body">\nFoo&#x000A;Bar&#x000A; Baz&#x000A; Boom</textarea>\n),
render('= text_area_tag "body", "Foo\nBar\n Baz\n Boom"', :action_view))
assert_equal(%(<textarea id="post_body" name="post[body]">\nFoo bar&#x000A;baz</textarea>\n),
render('= text_area :post, :body', :action_view))
assert_equal(%(<pre>Foo bar&#x000A; baz</pre>\n),
render('= content_tag "pre", "Foo bar\n baz"', :action_view))
end
elsif (ActionPack::VERSION::MAJOR == 3) && (ActionPack::VERSION::MINOR >= 2) && (ActionPack::VERSION::TINY >= 3)
def test_text_area
assert_equal(%(<textarea id="body" name="body">\nFoo&#x000A;Bar&#x000A; Baz&#x000A; Boom</textarea>\n),
render('= text_area_tag "body", "Foo\nBar\n Baz\n Boom"', :action_view))