lib/loquor/api_calls/index.rb in loquor-1.5.0 vs lib/loquor/api_calls/index.rb in loquor-1.6.0
- old
+ new
@@ -71,21 +71,21 @@
substitute_value = Loquor.config.substitute_values[value]
if !substitute_value.nil?
query_string << "#{key}=#{URI.encode(substitute_value)}"
else
case value
- when String, Symbol, Numeric
+ when String, Symbol, Numeric, Date, Time, DateTime
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, arrays or single-depth hashes.")
+ raise LoquorError.new("Filter values must be strings, arrays, date, time, datetime or single-depth hashes.")
end
end
end
def add_clause(query_string, clause)