@current_user -> current_user
This commit is contained in:
parent
e06733d01b
commit
21910c959e
1 changed files with 4 additions and 4 deletions
|
@ -10,14 +10,14 @@ module Users
|
|||
end
|
||||
|
||||
def update_email
|
||||
if @current_user.update(update_email_params)
|
||||
if current_user.update(update_email_params)
|
||||
flash.notice = t('devise.registrations.update_needs_confirmation')
|
||||
elsif @current_user.errors&.details&.dig(:email)&.any? { |e| e[:error] == :taken }
|
||||
UserMailer.account_already_taken(@current_user, requested_email).deliver_later
|
||||
elsif current_user.errors&.details&.dig(:email)&.any? { |e| e[:error] == :taken }
|
||||
UserMailer.account_already_taken(current_user, requested_email).deliver_later
|
||||
# avoid leaking information about whether an account with this email exists or not
|
||||
flash.notice = t('devise.registrations.update_needs_confirmation')
|
||||
else
|
||||
flash.alert = @current_user.errors.full_messages
|
||||
flash.alert = current_user.errors.full_messages
|
||||
end
|
||||
|
||||
redirect_to profil_path
|
||||
|
|
Loading…
Reference in a new issue