diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index b1d02bca..c02e75b4 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -63,9 +63,9 @@ class UserController < ApplicationController :privacy_allow_stranger_answers, :privacy_show_in_search) if current_user.update(user_attributes) - flash[:success] = t('flash.user.update_privacy.success') + flash[:success] = t(".success") else - flash[:error] = t('flash.user.update_privacy.error') + flash[:error] = t(".error") end redirect_to edit_user_privacy_path end diff --git a/config/locales/controllers.en.yml b/config/locales/controllers.en.yml index bfc9cdf0..efed0466 100644 --- a/config/locales/controllers.en.yml +++ b/config/locales/controllers.en.yml @@ -51,6 +51,9 @@ en: error: :errors.invalid_otp destroy_2fa: success: "Two factor authentication has been disabled for your account." + update_privacy: + success: :user.update.success + error: :user.update.error update_profile: success: :user.update.success error: :user.update.error