Skip to content

Commit

Permalink
FC-1357 Fix Mongoid not defined
Browse files Browse the repository at this point in the history
  • Loading branch information
stengineering0 committed Oct 12, 2022
1 parent 3b6427d commit cc0223d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
searchkick (5.0.4.pre.everfi.1.0.0)
searchkick (5.0.4.pre.everfi.1.0.1)
activemodel (>= 5.2)
hashie

Expand Down
4 changes: 3 additions & 1 deletion lib/searchkick.rb
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,10 @@ def self.refresh_value=(value)
def self.relation?(klass)
if klass.respond_to?(:current_scope)
!klass.current_scope.nil?
else
elsif defined?(Mongoid) # Should be fixed in upstream by https://github.com/ankane/searchkick/issues/1592
klass.is_a?(Mongoid::Criteria) || !Mongoid::Threaded.current_scope(klass).nil?
else
false
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/searchkick/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Searchkick
VERSION = "5.0.4.pre.everfi.1.0.0"
VERSION = "5.0.4.pre.everfi.1.0.1"
end

0 comments on commit cc0223d

Please sign in to comment.