Commit 82efbb48a62389228f1cd9257f66d27ac54545be
1 parent
ed7a137f
Exists in
master
and in
19 other branches
No association updates either
Showing
1 changed file
with
2 additions
and
0 deletions
Show diff stats
lib/searchkick/model.rb
... | ... | @@ -37,6 +37,8 @@ module Searchkick |
37 | 37 | alias_method :search_index, :searchkick_index unless method_defined?(:search_index) |
38 | 38 | |
39 | 39 | def searchkick_reindex(method_name = nil, full: false, **options) |
40 | + return unless Searchkick.callbacks? | |
41 | + | |
40 | 42 | scoped = (respond_to?(:current_scope) && respond_to?(:default_scoped) && current_scope && current_scope.to_sql != default_scoped.to_sql) || |
41 | 43 | (respond_to?(:queryable) && queryable != unscoped.with_default_scope) |
42 | 44 | ... | ... |