Add and apply Style/SafeNavigation rubocop rule

We were already using it most of the time, but not always.
This commit is contained in:
Javi Martín
2019-10-10 03:02:45 +02:00
parent 6ceca143b4
commit 1004ac01f8
10 changed files with 22 additions and 19 deletions

View File

@@ -51,7 +51,7 @@ class Verification::LetterController < ApplicationController
def login_via_form
user = User.find_by email: letter_params[:email]
if user && user.valid_password?(letter_params[:password])
if user&.valid_password?(letter_params[:password])
sign_in(user)
end
end