From c6e70b0ebf2d495b8990f6c988ed9ddbca77c144 Mon Sep 17 00:00:00 2001 From: knjko Date: Fri, 12 Oct 2018 01:07:01 +0900 Subject: [PATCH] Change :updated_not_sign_in -> :updated_but_not_signed_in and fix the message --- app/controllers/devise/registrations_controller.rb | 2 +- config/locales/en.yml | 2 +- test/integration/registerable_test.rb | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/controllers/devise/registrations_controller.rb b/app/controllers/devise/registrations_controller.rb index 77b8843deb..79a2bc7692 100644 --- a/app/controllers/devise/registrations_controller.rb +++ b/app/controllers/devise/registrations_controller.rb @@ -153,7 +153,7 @@ def set_flash_message_for_update(resource, prev_unconfirmed_email) elsif sign_in_after_change_password? :updated else - :updated_not_sign_in + :updated_but_not_signed_in end set_flash_message :notice, flash_key end diff --git a/config/locales/en.yml b/config/locales/en.yml index d1168c08d8..55617bdf3c 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -44,7 +44,7 @@ en: signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account." update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address." updated: "Your account has been updated successfully." - updated_not_sign_in: "Your password has been changed successfully. please try signing in" + updated_but_not_signed_in: "Your account has been updated successfully, but since your password was changed, you need to sign in again" sessions: signed_in: "Signed in successfully." signed_out: "Signed out successfully." diff --git a/test/integration/registerable_test.rb b/test/integration/registerable_test.rb index f01cb750be..3070e53b11 100644 --- a/test/integration/registerable_test.rb +++ b/test/integration/registerable_test.rb @@ -189,7 +189,7 @@ def user_sign_up fill_in 'current password', with: '12345678' click_button 'Update' - assert_contain 'Your password has been changed successfully. please try signing in' + assert_contain 'Your account has been updated successfully, but since your password was changed, you need to sign in again' assert_equal new_user_session_path, @request.path assert !warden.authenticated?(:user) end