Permalink
Browse files

Add a new line after the textarea opening tag.

Closes #393
  • Loading branch information...
1 parent 663904f commit 2b4e7a784e57736d684611d8c123b78539248587 @rafaelfranca rafaelfranca committed Feb 27, 2012
@@ -1072,7 +1072,7 @@ def to_text_area_tag(options = {})
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
def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0")
@@ -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
Oops, something went wrong.

0 comments on commit 2b4e7a7

Please sign in to comment.