Commit 2755fbc7cb47e4e6f0d872586dca33588d354e47
1 parent
b023f23c
Exists in
master
and in
21 other branches
Changes recommended by @nviennot
More exact ORM checking for NoBrainer and requiring active_support/core_ext for the facet tests.
Showing
2 changed files
with
2 additions
and
1 deletions
Show diff stats
lib/searchkick/results.rb
... | ... | @@ -24,7 +24,7 @@ module Searchkick |
24 | 24 | hits.group_by{|hit, i| hit["_type"] }.each do |type, grouped_hits| |
25 | 25 | records = type.camelize.constantize |
26 | 26 | if options[:includes] |
27 | - if records.respond_to?(:preload) | |
27 | + if defined?(NoBrainer::Document) and records < NoBrainer::Document | |
28 | 28 | records = records.preload(options[:includes]) |
29 | 29 | else |
30 | 30 | records = records.includes(options[:includes]) | ... | ... |