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:
parent
83ef8b20c8
commit
f20d64ede0
1 changed files with 12 additions and 1 deletions
|
@ -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
Bar
 Baz
 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
baz</textarea>\n),
|
||||
render('= text_area :post, :body', :action_view))
|
||||
|
||||
assert_equal(%(<pre>Foo bar
 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
Bar
 Baz
 Boom</textarea>\n),
|
||||
render('= text_area_tag "body", "Foo\nBar\n Baz\n Boom"', :action_view))
|
||||
|
|
Loading…
Reference in a new issue