Commit 717ed55c810a667b356b08ea3d7d436632ba5def

Authored by Andrew
1 parent e0404691

Raise error when trying to index id [skip ci]

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/searchkick/record_data.rb
... ... @@ -58,7 +58,7 @@ module Searchkick
58 58 end
59 59 end
60 60 EXCLUDED_ATTRIBUTES.each do |attr|
61   - source.delete(attr)
  61 + raise Searchkick::Error, "Cannot index a field with name: #{attr}" if source[attr]
62 62 end
63 63  
64 64 # conversions
... ...