diff options
author | Rick Olson <technoweenie@gmail.com> | 2007-05-09 03:51:06 +0000 |
---|---|---|
committer | Rick Olson <technoweenie@gmail.com> | 2007-05-09 03:51:06 +0000 |
commit | 08736788c906d2b05fe6c45e6922e594149c9b12 (patch) | |
tree | 40430c567a1662a958ee78aa230b5c1431dc4fdb /activeresource/lib/active_resource | |
parent | 2b6ad48ea3c80e693b3c92f90432c790c8ee1510 (diff) | |
download | rails-08736788c906d2b05fe6c45e6922e594149c9b12.tar.gz rails-08736788c906d2b05fe6c45e6922e594149c9b12.tar.bz2 rails-08736788c906d2b05fe6c45e6922e594149c9b12.zip |
Handle string and symbol param keys when splitting params into prefix params and query params.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 0f147acad9..a0e92dba72 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -215,7 +215,8 @@ module ActiveResource prefix_options, query_options = {}, {} (options || {}).each do |key, value| - (prefix_parameters.include?(key) ? prefix_options : query_options)[key] = value + next if key.blank? + (prefix_parameters.include?(key.to_sym) ? prefix_options : query_options)[key.to_sym] = value end [ prefix_options, query_options ] @@ -360,7 +361,7 @@ module ActiveResource def load_attributes_from_response(response) if response['Content-size'] != "0" && response.body.strip.size > 0 load(connection.xml_from_response(response)) - end + end end # Takes a response from a typical create post and pulls the ID out |