Commit 28760596bea39938c22349a8024c51c751dce8d5
1 parent
22f31ce0
Exists in
master
and in
2 other branches
Fixed relation check for Mongoid
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick.rb
@@ -327,7 +327,7 @@ module Searchkick | @@ -327,7 +327,7 @@ module Searchkick | ||
327 | if klass.respond_to?(:current_scope) | 327 | if klass.respond_to?(:current_scope) |
328 | !klass.current_scope.nil? | 328 | !klass.current_scope.nil? |
329 | else | 329 | else |
330 | - !Mongoid::Threaded.current_scope(klass).nil? | 330 | + klass.is_a?(Mongoid::Criteria) || !Mongoid::Threaded.current_scope(klass).nil? |
331 | end | 331 | end |
332 | end | 332 | end |
333 | 333 |