From 08736788c906d2b05fe6c45e6922e594149c9b12 Mon Sep 17 00:00:00 2001 From: Rick Olson Date: Wed, 9 May 2007 03:51:06 +0000 Subject: 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 --- activeresource/lib/active_resource/base.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'activeresource/lib') 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 -- cgit v1.2.3