Update mock_redis.
This commit is contained in:
@@ -221,7 +221,7 @@ GEM
|
||||
minitest (>= 5.0)
|
||||
ruby-progressbar
|
||||
mocha (1.11.2)
|
||||
mock_redis (0.23.0)
|
||||
mock_redis (0.24.0)
|
||||
msgpack (1.3.3)
|
||||
msgpack (1.3.3-x64-mingw32)
|
||||
multi_json (1.14.1)
|
||||
|
||||
@@ -18,8 +18,7 @@ class SavedSearch < ApplicationRecord
|
||||
post_ids = Set.new
|
||||
queries.each do |query|
|
||||
redis_key = "search:#{query}"
|
||||
# XXX change to `exists?` (ref: https://github.com-sds/mock_redis/pull/188
|
||||
if redis.exists(redis_key)
|
||||
if redis.exists?(redis_key)
|
||||
sub_ids = redis.smembers(redis_key).map(&:to_i)
|
||||
post_ids.merge(sub_ids)
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user