The code `where(id: ids)` is equivalent to `where(id: ids.uniq)`. Since Rails 5 uses `distinct` instead of `uniq` and in most cases where we use `uniq` with `pluck` we should simply remove the `uniq` call (as done in this commit), we're also removing the `Rails/UniqBeforePluck` rubocop rule.