Skip to content
Permalink
Browse files
Merge pull request #5191 from rafaelfranca/fix-393
Add a new line after the textarea opening tag.
  • Loading branch information
tenderlove committed Feb 27, 2012
2 parents 699e460 + a6074c3 commit a4e4d2855bbad1c1400fb89ba663f7193d76dc10
@@ -12,7 +12,7 @@ def render
options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
end

content_tag("textarea", ERB::Util.html_escape(options.delete('value') || value_before_type_cast(object)), options)
content_tag("textarea", "\n#{options.delete('value') || value_before_type_cast(object)}", options)
end
end
end
@@ -29,7 +29,7 @@ def setup

def test_text_area_with_errors
assert_dom_equal(
%(<div class="field_with_errors"><textarea cols="40" id="post_body" name="post[body]" rows="20">Back to the hill and over it again!</textarea></div>),
%(<div class="field_with_errors"><textarea cols="40" id="post_body" name="post[body]" rows="20">\nBack to the hill and over it again!</textarea></div>),
text_area("post", "body")
)
end

0 comments on commit a4e4d28

Please sign in to comment.