Class: EmailVerificationsController

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

Instance Method Summary collapse

Instance Method Details

#createObject

Sends an email verification email to the current_user



15
16
17
18
# File 'app/controllers/email_verifications_controller.rb', line 15

def create
  MinimalistAuthenticationMailer.with(user: current_user).verify_email.deliver_now
  redirect_to dashboard_path, notice: t(".notice", email: current_user.email)
end

#newObject

Form for current_user to request an email verification email



10
11
12
# File 'app/controllers/email_verifications_controller.rb', line 10

def new
  # new.html.erb
end

#showObject

Verifies the email of the current_user using the provided token



5
6
7
# File 'app/controllers/email_verifications_controller.rb', line 5

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