diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2023-04-16 07:01:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-16 07:01:24 +0200 |
commit | e5c0b1673587885e5bbffbb376b16d773fb68193 (patch) | |
tree | 73dfe93b684454024b2de62ecdf0c6f30201f7fb /app/controllers | |
parent | 955ec252a421a5060345815bac0c63e8718bc3d8 (diff) |
Add progress indicator to sign-up flow (#24545)
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/auth/setup_controller.rb | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/app/controllers/auth/setup_controller.rb b/app/controllers/auth/setup_controller.rb index 46c5f2958..40916d288 100644 --- a/app/controllers/auth/setup_controller.rb +++ b/app/controllers/auth/setup_controller.rb @@ -10,15 +10,7 @@ class Auth::SetupController < ApplicationController skip_before_action :require_functional! - def show - flash.now[:notice] = begin - if @user.pending? - I18n.t('devise.registrations.signed_up_but_pending') - else - I18n.t('devise.registrations.signed_up_but_unconfirmed') - end - end - end + def show; end def update # This allows updating the e-mail without entering a password as is required @@ -26,14 +18,13 @@ class Auth::SetupController < ApplicationController # that were not confirmed yet if @user.update(user_params) - redirect_to auth_setup_path, notice: I18n.t('devise.confirmations.send_instructions') + @user.resend_confirmation_instructions unless @user.confirmed? + redirect_to auth_setup_path, notice: I18n.t('auth.setup.new_confirmation_instructions_sent') else render :show end end - helper_method :missing_email? - private def require_unconfirmed_or_pending! @@ -51,8 +42,4 @@ class Auth::SetupController < ApplicationController def user_params params.require(:user).permit(:email) end - - def missing_email? - truthy_param?(:missing_email) - end end |