0
0
Fork 0

Fix Rails/WhereExists cop in app/models (#28863)

This commit is contained in:
Matt Jankowski 2024-01-24 04:57:49 -05:00 committed by GitHub
parent 599bc69503
commit 9d413cbaf8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 3 additions and 6 deletions

View file

@ -57,7 +57,7 @@ class Poll < ApplicationRecord
end
def voted?(account)
account.id == account_id || votes.where(account: account).exists?
account.id == account_id || votes.exists?(account: account)
end
def own_votes(account)