diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-20 09:34:29 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-20 09:34:29 +0000 |
commit | 54c393f5fa2dfd5ff5866cba74e7179f493732df (patch) | |
tree | 71f7ad34c813ee02081f4f7b8ab01038d292d03e /activeresource | |
parent | 5ddc82c3a11a71806ea91f66fdb28fbbe30716f7 (diff) | |
download | rails-54c393f5fa2dfd5ff5866cba74e7179f493732df.tar.gz rails-54c393f5fa2dfd5ff5866cba74e7179f493732df.tar.bz2 rails-54c393f5fa2dfd5ff5866cba74e7179f493732df.zip |
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
Diffstat (limited to 'activeresource')
-rw-r--r-- | activeresource/lib/active_resource/connection.rb | 2 | ||||
-rw-r--r-- | activeresource/lib/active_resource/validations.rb | 2 |
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} " |