From eb3e4f30b1863f8f4196b25d34b0c267e991e2b7 Mon Sep 17 00:00:00 2001 From: Andrew Kane Date: Wed, 18 Mar 2020 04:11:13 -0700 Subject: [PATCH] Remove keys with underscore [skip ci] --- lib/searchkick/relation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/searchkick/relation.rb b/lib/searchkick/relation.rb index 41e1702..955095c 100644 --- a/lib/searchkick/relation.rb +++ b/lib/searchkick/relation.rb @@ -127,7 +127,7 @@ module Searchkick field = fields.first result.map { |v| v[field] } else - fields = result.first.keys if fields.empty? && result.any? + fields = result.first.keys.reject { |k| k.start_with?("_") } if fields.empty? && result.any? result.map { |v| fields.map { |f| v[f] } } end end -- libgit2 0.21.0