Sha256: ce09b6bff3ebddfff06e02daee87e2c442dcda65b0c717c611e0d2e0912e7fbc
Contents?: true
Size: 770 Bytes
Versions: 3
Compression:
Stored size: 770 Bytes
Contents
class Identity::EmailVerificationsController < ApplicationController skip_before_action :authenticate, only: :edit before_action :set_user, only: :edit def edit @user.update! verified: true redirect_to root_path, notice: "Thank you for verifying your email address" end def create send_email_verification redirect_to root_path, notice: "We sent a verification email to your email address" end private def set_user @token = EmailVerificationToken.find_signed!(params[:sid]); @user = @token.user rescue redirect_to edit_identity_email_path, alert: "That email verification link is invalid" end def send_email_verification UserMailer.with(user: Current.user).email_verification.deliver_later end end
Version data entries
3 entries across 3 versions & 1 rubygems