Commit 41bb6c6080dd5cd52a18592e0c768fae6fcc9ba8
1 parent
af170b19
Exists in
master
and in
21 other branches
More
Showing
1 changed file
with
4 additions
and
1 deletions
Show diff stats
lib/searchkick/model.rb
1 | 1 | module Searchkick |
2 | + module Reindex; end # legacy for Searchjoy | |
3 | + | |
2 | 4 | module Model |
3 | 5 | |
4 | 6 | def searchkick(options = {}) |
... | ... | @@ -19,13 +21,14 @@ module Searchkick |
19 | 21 | define_singleton_method(Searchkick.search_method_name) do |term = nil, options={}, &block| |
20 | 22 | searchkick_index.search_model(self, term, options, &block) |
21 | 23 | end |
24 | + extend Searchkick::Reindex # legacy for Searchjoy | |
22 | 25 | |
23 | 26 | class << self |
24 | 27 | |
25 | 28 | def searchkick_index |
26 | 29 | index = class_variable_get :@@searchkick_index |
27 | 30 | index = index.call if index.respond_to? :call |
28 | - Searchkick::Index.new(index, class_variable_get(:@@searchkick_options)) | |
31 | + Searchkick::Index.new(index, searchkick_options) | |
29 | 32 | end |
30 | 33 | |
31 | 34 | def enable_search_callbacks | ... | ... |