From 3a0159dd1e66a53d2ee39b3a3625998706cd8ae6 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Fri, 21 Jul 2006 05:52:30 +0000 Subject: Strip boolean XML content before checking for 'true' [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/core_ext/hash/conversions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activesupport/lib/active_support/core_ext/hash/conversions.rb') diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index b97c6edeb0..38992f2926 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -95,7 +95,7 @@ module ActiveSupport #:nodoc: content = translate_xml_entities(value["__content__"]) case value["type"] when "integer" then content.to_i - when "boolean" then content == "true" + when "boolean" then content.strip == "true" when "datetime" then ::Time.parse(content).utc when "date" then ::Date.parse(content) else content -- cgit v1.2.3