aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource
diff options
context:
space:
mode:
Diffstat (limited to 'activeresource')
-rw-r--r--activeresource/lib/active_resource/connection.rb2
-rw-r--r--activeresource/lib/active_resource/validations.rb2
2 files changed, 2 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/connection.rb b/activeresource/lib/active_resource/connection.rb
index 21573a34cb..920e5a15b0 100644
--- a/activeresource/lib/active_resource/connection.rb
+++ b/activeresource/lib/active_resource/connection.rb
@@ -43,7 +43,7 @@ module ActiveResource
end
def get(path)
- Hash.create_from_xml(request(:get, path).body)
+ Hash.from_xml(request(:get, path).body)
end
def delete(path)
diff --git a/activeresource/lib/active_resource/validations.rb b/activeresource/lib/active_resource/validations.rb
index 8414e93293..f1995a6070 100644
--- a/activeresource/lib/active_resource/validations.rb
+++ b/activeresource/lib/active_resource/validations.rb
@@ -87,7 +87,7 @@ module ActiveResource
def from_xml(xml)
clear
humanized_attributes = @base.attributes.keys.inject({}) { |h, attr_name| h.update(attr_name.humanize => attr_name) }
- messages = Hash.create_from_xml(xml)['errors']['error'] rescue []
+ messages = Hash.from_xml(xml)['errors']['error'] rescue []
messages.each do |message|
attr_message = humanized_attributes.keys.detect do |attr_name|
if message[0, attr_name.size + 1] == "#{attr_name} "