Permalink
Browse files

gsub is not needed (thanks @fxn!)

  • Loading branch information...
indirect authored and dhh committed Apr 14, 2011
1 parent b41d8f3 commit 45683fb6c201fdad1df4b7047f981cf866df2a7c
Showing with 1 addition and 1 deletion.
  1. +1 −1 activesupport/lib/active_support/core_ext/hash/conversions.rb
@@ -96,7 +96,7 @@ def typecast_xml_value(value)
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)

0 comments on commit 45683fb

Please sign in to comment.