lib/loquor/api_calls/index.rb in loquor-1.1.1 vs lib/loquor/api_calls/index.rb in loquor-1.2.0
- old
+ new
@@ -67,11 +67,15 @@
query_string << "#{key}=#{URI.encode(value.to_s)}"
when Array
value.each do |v|
query_string << "#{key}[]=#{URI.encode(v.to_s)}"
end
+ when Hash
+ value.each do |k,v|
+ query_string << "#{key}[#{k}]=#{URI.encode(v.to_s)}"
+ end
else
- raise LoquorError.new("Filter values must be strings or arrays.")
+ raise LoquorError.new("Filter values must be strings, arrays or single-depth hashes.")
end
end
end
end
end