Commit eb3e4f30b1863f8f4196b25d34b0c267e991e2b7

Authored by Andrew Kane
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 127 field = fields.first
128 128 result.map { |v| v[field] }
129 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 131 result.map { |v| fields.map { |f| v[f] } }
132 132 end
133 133 end
... ...