diff options
author | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-17 19:30:43 -0400 |
---|---|---|
committer | Josh Kalderimis <josh.kalderimis@gmail.com> | 2011-05-18 00:34:09 -0400 |
commit | 6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa (patch) | |
tree | 197f51ebb7b9b9c7987bb29aec73b7da9536cff7 /activeresource/lib/active_resource/formats/xml_format.rb | |
parent | 4a9365ee18c055d970a5f8faaac9443a8bfb0d24 (diff) | |
download | rails-6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa.tar.gz rails-6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa.tar.bz2 rails-6b4bbb427455ec1af6bdf0896a62129bd3c8c4aa.zip |
updated all the tests in ARes to work with json
Diffstat (limited to 'activeresource/lib/active_resource/formats/xml_format.rb')
-rw-r--r-- | activeresource/lib/active_resource/formats/xml_format.rb | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/activeresource/lib/active_resource/formats/xml_format.rb b/activeresource/lib/active_resource/formats/xml_format.rb index 3b2575cfa1..49cb9aa1ac 100644 --- a/activeresource/lib/active_resource/formats/xml_format.rb +++ b/activeresource/lib/active_resource/formats/xml_format.rb @@ -18,19 +18,8 @@ module ActiveResource end def decode(xml) - from_xml_data(Hash.from_xml(xml)) + Formats.remove_root(Hash.from_xml(xml)) end - - private - # Manipulate from_xml Hash, because xml_simple is not exactly what we - # want for Active Resource. - def from_xml_data(data) - if data.is_a?(Hash) && data.keys.size == 1 - data.values.first - else - data - end - end end end end |