Commit 717ed55c810a667b356b08ea3d7d436632ba5def
1 parent
e0404691
Exists in
master
and in
19 other branches
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,7 +58,7 @@ module Searchkick | ||
58 | end | 58 | end |
59 | end | 59 | end |
60 | EXCLUDED_ATTRIBUTES.each do |attr| | 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 | end | 62 | end |
63 | 63 | ||
64 | # conversions | 64 | # conversions |