aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/formats/xml_format.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource/lib/active_resource/formats/xml_format.rb')
-rw-r--r--activeresource/lib/active_resource/formats/xml_format.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/activeresource/lib/active_resource/formats/xml_format.rb b/activeresource/lib/active_resource/formats/xml_format.rb
index 5e97ffa776..86c6cec745 100644
--- a/activeresource/lib/active_resource/formats/xml_format.rb
+++ b/activeresource/lib/active_resource/formats/xml_format.rb
@@ -2,23 +2,23 @@ module ActiveResource
module Formats
module XmlFormat
extend self
-
+
def extension
"xml"
end
-
+
def mime_type
"application/xml"
end
-
- def encode(hash)
- hash.to_xml
+
+ def encode(hash, options={})
+ hash.to_xml(options)
end
-
+
def decode(xml)
from_xml_data(Hash.from_xml(xml))
end
-
+
private
# Manipulate from_xml Hash, because xml_simple is not exactly what we
# want for Active Resource.
@@ -28,7 +28,7 @@ module ActiveResource
else
data
end
- end
+ end
end
end
-end \ No newline at end of file
+end