Use Ruby safe navigation over Rails try
re: https://www.rubydoc.info/gems/rubocop/RuboCop/Cop/Style/SafeNavigation
This commit is contained in:
parent
d8bd269a64
commit
24396d35c2
11 changed files with 26 additions and 27 deletions
|
|
@ -133,7 +133,7 @@ class User < ApplicationRecord
|
|||
def self.for_ichain_username(username, attributes)
|
||||
user = find_by(username: username)
|
||||
|
||||
raise UserDisabled if user && user.is_disabled
|
||||
raise UserDisabled if user&.is_disabled
|
||||
|
||||
if user
|
||||
user.update_attributes(email: attributes[:email],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue