Commit eb3e4f30b1863f8f4196b25d34b0c267e991e2b7
1 parent
1c55be9f
Exists in
relation
Remove keys with underscore [skip ci]
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/searchkick/relation.rb
@@ -127,7 +127,7 @@ module Searchkick | @@ -127,7 +127,7 @@ module Searchkick | ||
127 | field = fields.first | 127 | field = fields.first |
128 | result.map { |v| v[field] } | 128 | result.map { |v| v[field] } |
129 | else | 129 | else |
130 | - fields = result.first.keys if fields.empty? && result.any? | 130 | + fields = result.first.keys.reject { |k| k.start_with?("_") } if fields.empty? && result.any? |
131 | result.map { |v| fields.map { |f| v[f] } } | 131 | result.map { |v| fields.map { |f| v[f] } } |
132 | end | 132 | end |
133 | end | 133 | end |