From b65a65868ca0ec4bf8790dbb2caad35c2971c4f8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Fri, 2 Mar 2018 23:32:23 -0800 Subject: [PATCH] Fixed index cache [skip ci] --- lib/searchkick/model.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/searchkick/model.rb b/lib/searchkick/model.rb index 01013f8..26ae73b 100644 --- a/lib/searchkick/model.rb +++ b/lib/searchkick/model.rb @@ -48,7 +48,7 @@ module Searchkick index = class_variable_get(:@@searchkick_index) index = index.call if index.respond_to?(:call) index_cache = class_variable_get(:@@searchkick_index_cache) - index_cache[name] ||= Searchkick::Index.new(index, searchkick_options) + index_cache[index] ||= Searchkick::Index.new(index, searchkick_options) end alias_method :search_index, :searchkick_index unless method_defined?(:search_index) -- libgit2 0.21.0