diff options
Diffstat (limited to 'app/controllers/profiles/emails_controller.rb')
-rw-r--r-- | app/controllers/profiles/emails_controller.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/profiles/emails_controller.rb b/app/controllers/profiles/emails_controller.rb index 60426e4f14f..152b71e687d 100644 --- a/app/controllers/profiles/emails_controller.rb +++ b/app/controllers/profiles/emails_controller.rb @@ -24,6 +24,16 @@ class Profiles::EmailsController < Profiles::ApplicationController end end + def resend_confirmation_instructions + @email = current_user.emails.find(params[:id]) + if @email && Emails::ConfirmService.new(current_user, email: @email.email).execute + flash[:notice] = "Confirmation email sent to #{@email.email}" + else + flash[:alert] = "There was a problem sending the confirmation email" + end + redirect_to profile_emails_url + end + private def email_params |