Commit 03cb0c655a8e538fc2b5cee634a3c9923819381f
1 parent
968ae8ba
Exists in
master
and in
21 other branches
Allow Searchkick.search_method_name to be nil or false
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick/model.rb
... | ... | @@ -21,7 +21,7 @@ module Searchkick |
21 | 21 | def searchkick_search(term = nil, options = {}, &block) |
22 | 22 | searchkick_index.search_model(self, term, options, &block) |
23 | 23 | end |
24 | - alias_method Searchkick.search_method_name, :searchkick_search | |
24 | + alias_method Searchkick.search_method_name, :searchkick_search if Searchkick.search_method_name | |
25 | 25 | |
26 | 26 | def searchkick_index |
27 | 27 | index = class_variable_get :@@searchkick_index | ... | ... |