Fix Rails/WhereExists
cop in app/models (#28863)
This commit is contained in:
parent
599bc69503
commit
9d413cbaf8
4 changed files with 3 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue