rubocop: fix various Rubocop warnings.
This commit is contained in:
@@ -20,7 +20,7 @@ class PostApproval < ApplicationRecord
|
||||
errors.add(:base, "You cannot approve a post you uploaded")
|
||||
end
|
||||
|
||||
if post.approver == user || post.approvals.where(user: user).exists?
|
||||
if post.approver == user || post.approvals.exists?(user: user)
|
||||
errors.add(:base, "You have previously approved this post and cannot approve it again")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user