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

@@ -13,7 +13,7 @@ class Verification::Management::Email
delegate :username, to: :user, allow_nil: true
def user
@user ||= User.where(email: email).first
@user ||= User.find_by(email: email)
end
def user?