Apply Rails/FindBy rubocop rule

We were already using it in most places.
This commit is contained in:
Javi Martín
2019-10-20 16:57:25 +02:00
parent 794857c31c
commit 93c6347b45
18 changed files with 27 additions and 28 deletions

View File

@@ -30,7 +30,7 @@ class Legislation::Question < ApplicationRecord
end
def answer_for_user(user)
answers.where(user: user).first
answers.find_by(user: user)
end
def comments_for_verified_residents_only?