aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers/form_tag_helper.rb
diff options
context:
space:
mode:
authorRuben Fonseca <root@cpan.org>2012-02-21 17:03:42 +0000
committerRuben Fonseca <root@cpan.org>2012-02-21 17:04:22 +0000
commitc0ec40c83a7e2370f0f4a01055aafb69026d8099 (patch)
tree6e665acff40441b0aaf6b87bdcfc428e3a397ce3 /actionpack/lib/action_view/helpers/form_tag_helper.rb
parent92a7296a5deb109d054b32d96fa1a74f0859a81b (diff)
downloadrails-c0ec40c83a7e2370f0f4a01055aafb69026d8099.tar.gz
rails-c0ec40c83a7e2370f0f4a01055aafb69026d8099.tar.bz2
rails-c0ec40c83a7e2370f0f4a01055aafb69026d8099.zip
Refactored two methods to use delete with a block
Diffstat (limited to 'actionpack/lib/action_view/helpers/form_tag_helper.rb')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index 53fd189c39..2cf1c9055c 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -313,7 +313,7 @@ module ActionView
options["cols"], options["rows"] = size.split("x") if size.respond_to?(:split)
end
- escape = options.key?("escape") ? options.delete("escape") : true
+ escape = options.delete("escape") { true }
content = ERB::Util.html_escape(content) if escape
content_tag :textarea, content.to_s.html_safe, { "name" => name, "id" => sanitize_to_id(name) }.update(options)