diff options
author | Jonathan del Strother <jon.delStrother@bestbefore.tv> | 2009-03-12 17:53:16 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2009-03-12 18:35:49 +0000 |
commit | 923067810480c93817dbae3d8295a18aa2a2ec3a (patch) | |
tree | 868dcb935c46cb8d5b822af654038b4beb9b0404 /activesupport/lib/active_support/core_ext/hash | |
parent | d771e7d17f4a2c175676f7c8354aa5b161b63c2e (diff) | |
download | rails-923067810480c93817dbae3d8295a18aa2a2ec3a.tar.gz rails-923067810480c93817dbae3d8295a18aa2a2ec3a.tar.bz2 rails-923067810480c93817dbae3d8295a18aa2a2ec3a.zip |
Use xmlschema when serializing TimeWithZones to xml [#2223 state:resolved]
When using Hash#to_xml, any TimeWithZone objects now use xmlschema (iso8601), rather than a simple TimeWithZone#to_s.
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'activesupport/lib/active_support/core_ext/hash')
-rw-r--r-- | activesupport/lib/active_support/core_ext/hash/conversions.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/hash/conversions.rb b/activesupport/lib/active_support/core_ext/hash/conversions.rb index 991a5a6a89..10435975c5 100644 --- a/activesupport/lib/active_support/core_ext/hash/conversions.rb +++ b/activesupport/lib/active_support/core_ext/hash/conversions.rb @@ -24,11 +24,12 @@ module ActiveSupport #:nodoc: "Bignum" => "integer", "BigDecimal" => "decimal", "Float" => "float", + "TrueClass" => "boolean", + "FalseClass" => "boolean", "Date" => "date", "DateTime" => "datetime", "Time" => "datetime", - "TrueClass" => "boolean", - "FalseClass" => "boolean" + "ActiveSupport::TimeWithZone" => "datetime" } unless defined?(XML_TYPE_NAMES) XML_FORMATTING = { |