aboutsummaryrefslogtreecommitdiffstats
path: root/activeresource/lib/active_resource/base.rb
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2006-09-05 00:02:17 +0000
committerJeremy Kemper <jeremy@bitsweat.net>2006-09-05 00:02:17 +0000
commit26b76ea4ce6837a158d99b1071f6ae408cf65854 (patch)
treea13e955645ffc8ed493fb11c05e6e986c7bcc2c0 /activeresource/lib/active_resource/base.rb
parentb445ab986a2c177621a2154b0559be4c700abeeb (diff)
downloadrails-26b76ea4ce6837a158d99b1071f6ae408cf65854.tar.gz
rails-26b76ea4ce6837a158d99b1071f6ae408cf65854.tar.bz2
rails-26b76ea4ce6837a158d99b1071f6ae408cf65854.zip
load expects a Hash
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5008 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib/active_resource/base.rb')
-rw-r--r--activeresource/lib/active_resource/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb
index 40a50201a7..56c6dc172b 100644
--- a/activeresource/lib/active_resource/base.rb
+++ b/activeresource/lib/active_resource/base.rb
@@ -134,7 +134,7 @@ module ActiveResource
# Manually load attributes from a hash. Recursively loads collections of
# resources.
def load(attributes)
- return self if attributes.nil?
+ raise ArgumentError, "expected an attributes Hash, got #{attributes.inspect}" unless attributes.is_a?(Hash)
attributes.each do |key, value|
@attributes[key.to_s] =
case value