Class: EmailVerificationsController

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

Instance Method Summary collapse

Instance Method Details

#createObject



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

def create
  current_user.regenerate_verification_token
  MinimalistAuthenticationMailer.with(user: current_user).verify_email.deliver_now

  redirect_to dashboard_path, notice: t(".notice", email: current_user.email)
end

#newObject



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

def new
  # verify email for current_user
end

#showObject



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

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