Skip to content

Commit

Permalink
Review clean
Browse files Browse the repository at this point in the history
  • Loading branch information
B-Rass committed Dec 6, 2023
1 parent 8070e3f commit 41b0a93
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion app/controllers/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def destroy
def reset_authentication_token
@user.regenerate_authentication_token!

redirect_to edit_registration_path(@user)
redirect_to edit_registration_path(@user), notice: t(".flashes.authentication_token_reset")
end

private
Expand Down
2 changes: 2 additions & 0 deletions config/locales/fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,8 @@ fr:
show:
action:
show_authentication_token: Afficher la clé API
flashes:
authentication_token_reset: La clé API a été réinitialisée

views:
pagination:
Expand Down
2 changes: 1 addition & 1 deletion spec/models/user_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

describe "#regenerate_authentication_token!" do
before do
user.authentication_token = "auth_token"
user.update!(authentication_token: "auth_token")
user.regenerate_authentication_token!
end

Expand Down

0 comments on commit 41b0a93

Please sign in to comment.