diff options
author | Marc G Gauthier <marcg.gauthier@gmail.com> | 2011-09-01 18:26:29 +0200 |
---|---|---|
committer | Marc G Gauthier <marcg.gauthier@gmail.com> | 2011-09-01 18:26:29 +0200 |
commit | 28d605ff7fe1de0ae9b3bcdb48ac6209859c7ecf (patch) | |
tree | e4f82068fd6de086d94b651b9ea2dc751fa301c2 /activeresource/lib/active_resource | |
parent | 03b96306176bfc328929cb422ae61d37ee071310 (diff) | |
download | rails-28d605ff7fe1de0ae9b3bcdb48ac6209859c7ecf.tar.gz rails-28d605ff7fe1de0ae9b3bcdb48ac6209859c7ecf.tar.bz2 rails-28d605ff7fe1de0ae9b3bcdb48ac6209859c7ecf.zip |
Do not use objects that don't respond to to_sym (integers, floats, dates...) as parameters
Diffstat (limited to 'activeresource/lib/active_resource')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index f88772a7ff..990d9a38dd 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -955,7 +955,7 @@ module ActiveResource prefix_options, query_options = {}, {} (options || {}).each do |key, value| - next if key.blank? || [Fixnum, Date, Time, Float].include?(key.class) + next if key.blank? || !key.respond_to?(:to_sym) (prefix_parameters.include?(key.to_sym) ? prefix_options : query_options)[key.to_sym] = value end |