Sha256: e2d469f3bca95125fc9a2e8c4d27f2266731620855d079828e59565eba62c96a
Contents?: true
Size: 699 Bytes
Versions: 17
Compression:
Stored size: 699 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 UserMailer.with(user: Current.user).email_verification.deliver_later 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 end
Version data entries
17 entries across 17 versions & 1 rubygems