Class: Hello::Management::ConfirmEmailsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hello/management/confirm_emails_controller.rb

Instance Method Summary collapse

Instance Method Details

#confirmObject

GET /hello/emails/1/confirm/:token



12
13
14
15
16
17
18
19
20
21
22
23
# File 'app/controllers/hello/management/confirm_emails_controller.rb', line 12

def confirm
  business = Business::Management::ConfirmEmail.new(@credential)

  if business.confirm_with_token(params[:token])
    
    flash[:notice] = business.success_message
    redirect_to profile_path
  else
    flash[:alert] = business.alert_message
    redirect_to expired_confirmation_token_emails_path
  end
end

#expired_confirmation_tokenObject

GET /hello/emails/expired_confirmation_token



26
27
28
# File 'app/controllers/hello/management/confirm_emails_controller.rb', line 26

def expired_confirmation_token
  render 'hello/management/email_credentials/expired_confirmation_token'
end