Class: EmailVerificationsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/email_verifications_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



6
7
8
9
10
11
# File 'app/controllers/email_verifications_controller.rb', line 6

def create
  current_user.regenerate_verification_token
  MinimalistAuthenticationMailer.verify_email(current_user).deliver_now

  redirect_to dashboard_path, notice: "Verification email sent to #{current_user.email}, follow the instructions to complete verification. Thank you!"
end

#newObject



2
3
4
# File 'app/controllers/email_verifications_controller.rb', line 2

def new
  # verify email for current_user
end

#showObject



13
14
15
# File 'app/controllers/email_verifications_controller.rb', line 13

def show
  current_user.verify_email(params[:token])
end