lib/searchkick.rb in searchkick-2.1.0 vs lib/searchkick.rb in searchkick-2.1.1

- old
+ new

@@ -143,9 +143,21 @@ batches_left: batches_left } end end + def self.with_redis + if redis + if redis.respond_to?(:with) + redis.with do |r| + yield r + end + else + yield redis + end + end + end + # private def self.load_records(records, ids) records = if records.respond_to?(:primary_key) # ActiveRecord