Commit 0c8f25cabf0098906bee6a11943a7cac475cd195
1 parent
6d38fd58
Exists in
master
and in
2 other branches
Improved variable name [skip ci]
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
lib/searchkick/model.rb
... | ... | @@ -60,10 +60,10 @@ module Searchkick |
60 | 60 | alias_method Searchkick.search_method_name, :searchkick_search if Searchkick.search_method_name |
61 | 61 | |
62 | 62 | def searchkick_index(name: nil) |
63 | - index = name || searchkick_index_name | |
64 | - index = index.call if index.respond_to?(:call) | |
63 | + index_name = name || searchkick_index_name | |
64 | + index_name = index_name.call if index_name.respond_to?(:call) | |
65 | 65 | index_cache = class_variable_get(:@@searchkick_index_cache) |
66 | - index_cache.fetch(index) { Searchkick::Index.new(index, searchkick_options) } | |
66 | + index_cache.fetch(index_name) { Searchkick::Index.new(index_name, searchkick_options) } | |
67 | 67 | end |
68 | 68 | alias_method :search_index, :searchkick_index unless method_defined?(:search_index) |
69 | 69 | ... | ... |