From 54c393f5fa2dfd5ff5866cba74e7179f493732df Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 20 Sep 2006 09:34:29 +0000 Subject: Hash.create_from_xml has been renamed to Hash.from_xml, alias will exist until Rails 2.0 [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activeresource/lib/active_resource/connection.rb | 2 +- activeresource/lib/active_resource/validations.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'activeresource/lib') 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} " -- cgit v1.2.3