Commit e5531222ae82e1fb9e817902258262ddc4381532
1 parent
22fe3a0a
Exists in
master
and in
19 other branches
Less code [skip ci]
Showing
1 changed file
with
1 additions
and
10 deletions
Show diff stats
lib/searchkick/record_indexer.rb
... | ... | @@ -14,16 +14,7 @@ module Searchkick |
14 | 14 | raise ArgumentError, "Invalid value for mode" |
15 | 15 | end |
16 | 16 | |
17 | - klass_options = index.options | |
18 | - | |
19 | - if mode.nil? | |
20 | - mode = | |
21 | - if Searchkick.callbacks_value | |
22 | - Searchkick.callbacks_value | |
23 | - else | |
24 | - klass_options[:callbacks] || true | |
25 | - end | |
26 | - end | |
17 | + mode ||= Searchkick.callbacks_value || index.options[:callbacks] || true | |
27 | 18 | |
28 | 19 | case mode |
29 | 20 | when :queue | ... | ... |