Class: EmailVerificationsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- EmailVerificationsController
- Defined in:
- app/controllers/email_verifications_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Sends an email verification email to the current_user.
-
#new ⇒ Object
Form for current_user to request an email verification email.
-
#show ⇒ Object
Verifies the email of the current_user using the provided token.
Instance Method Details
#create ⇒ Object
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 |
#new ⇒ Object
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 |
#show ⇒ Object
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 |