aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-20 09:34:29 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-20 09:34:29 +0000
commit54c393f5fa2dfd5ff5866cba74e7179f493732df (patch)
tree71f7ad34c813ee02081f4f7b8ab01038d292d03e /activeresource/lib
parent5ddc82c3a11a71806ea91f66fdb28fbbe30716f7 (diff)
downloadrails-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/lib')
-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} "