Skip to content

Commit

Permalink
#355: fix password changing and password confirmation message
Browse files Browse the repository at this point in the history
  • Loading branch information
JoaoFelipe committed Aug 8, 2021
1 parent 7e9e1c2 commit d5aacfc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 7 additions & 0 deletions app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,11 @@ class UsersController < ApplicationController

config.actions.exclude :deleted_records
end

def after_update_save(record)
if record == current_user
bypass_sign_in(record)
end
end

end
4 changes: 2 additions & 2 deletions config/locales/pt-BR.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pt-BR:
messages: &errors_messages
accepted: "deve ser aceito"
blank: "não pode ficar em branco"
confirmation: "não está igual"
confirmation: "não está igual à %{attribute}"
empty: "não pode ficar vazio"
equal_to: "deve ser igual a %{count}"
even: "deve ser par"
Expand Down Expand Up @@ -434,7 +434,7 @@ pt-BR:
user:
name: "Nome do usuário"
password: "Senha"
password_confirmation: "Digite a senha novamente"
password_confirmation: "Confirmação de senha"
role: Papel
version:
created_at: "Modificado em"
Expand Down

0 comments on commit d5aacfc

Please sign in to comment.