aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/core_ext/hash/conversions.rb
diff options
context:
space:
mode:
authorAndre Arko <andre@arko.net>2011-04-14 16:36:13 +0800
committerDavid Heinemeier Hansson <david@loudthinking.com>2011-04-14 16:58:52 +0800
commitd01be122b84bd0a5f6315650593564b1d8aa50d0 (patch)
treefa8a2bba2638c9a3e077e2e7d10004c6b60d4769 /activesupport/lib/active_support/core_ext/hash/conversions.rb
parent90246acb6dd1f09847ccc1c11ae0c1afad928995 (diff)
downloadrails-d01be122b84bd0a5f6315650593564b1d8aa50d0.tar.gz
rails-d01be122b84bd0a5f6315650593564b1d8aa50d0.tar.bz2
rails-d01be122b84bd0a5f6315650593564b1d8aa50d0.zip
gsub is not needed (thanks @fxn!)
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash/conversions.rb')
-rw-r--r--activesupport/lib/active_support/core_ext/hash/conversions.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb
index 06bd8341ca..7e3a8c6775 100644
--- a/activesupport/lib/active_support/core_ext/hash/conversions.rb
+++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -108,7 +108,7 @@ class Hash
raise "can't typecast #{entries.inspect}"
end
end
- elsif value.has_key?("__content__") && value["__content__"].gsub(/\s/, '').present?
+ elsif value.has_key?("__content__") && value["__content__"].present?
content = value["__content__"]
if parser = ActiveSupport::XmlMini::PARSING[value["type"]]
parser.arity == 1 ? parser.call(content) : parser.call(content, value)