aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_helper.rb
diff options
context:
space:
mode:
authorJames Coleman <jtc331@gmail.com>2012-03-27 16:08:16 -0400
committerJames Coleman <jtc331@gmail.com>2012-03-27 17:00:39 -0400
commita7a422ec9726d3e4f4380b7406be30a4ed9d6187 (patch)
treed441c2a9c8b24bf91b49bb48d17c0d5969633d77 /actionpack/lib/action_view/helpers/form_helper.rb
parent3f1b8c6a95fcdcdc14ecd0f6fe1758a1e1044269 (diff)
downloadrails-a7a422ec9726d3e4f4380b7406be30a4ed9d6187.tar.gz
rails-a7a422ec9726d3e4f4380b7406be30a4ed9d6187.tar.bz2
rails-a7a422ec9726d3e4f4380b7406be30a4ed9d6187.zip
Don't break Haml with textarea newline fix.
See issue #393, issue #4000, issue #5190, and issue #5191. Adds a newline after the textarea opening tag based on @codykrieger's original patch so that we don't cause regressions in Haml-using apps. The regression caused textarea tags to add newlines to the field unintentionally (each update/save added an extra newline.) Also fix 6 more tests that didn't yet have the newline expectation.
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 2267f3c185..edca950638 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -1072,7 +1072,7 @@ module ActionView
options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
end
- content_tag("textarea", "\n#{options.delete('value') || value_before_type_cast(object)}", options)
+ content_tag("textarea", options.delete('value') || value_before_type_cast(object), options)
end
def to_check_box_tag(options = {}, checked_value = "1", unchecked_value = "0")