You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a non-string is passed as an query option value for a key we don't track (not :group_by or :filters, etc) we should validate that it is a string so it can be escaped later on.
Currently passing a non-string just throws a confusing exception:
>> Keen.count("votes", :max_age => 60)
NoMethodError: undefined method `gsub' for 60:Fixnum
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/1.9.1/cgi/util.rb:7:in `escape'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client.rb:109:in `block in preprocess_params'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client.rb:109:in `each'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client.rb:109:in `map'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client.rb:109:in `preprocess_params'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client/querying_methods.rb:239:in `_query_url'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client/querying_methods.rb:223:in `query'
from /Users/dzello/.rbenv/versions/1.9.3-p448/lib/ruby/gems/1.9.1/gems/keen-0.8.8/lib/keen/client/querying_methods.rb:19:in `count'
from (irb):7
from /Users/dzello/.rbenv/versions/1.9.3-p448/bin/irb:12:in `<main>'
The text was updated successfully, but these errors were encountered:
If a non-string is passed as an query option value for a key we don't track (not :group_by or :filters, etc) we should validate that it is a string so it can be escaped later on.
Currently passing a non-string just throws a confusing exception:
The text was updated successfully, but these errors were encountered: