Sha256: e6c1033563a40e58e0e9f9a000a991e8ea941b175f267178d99c62fca31fb4c6
Contents?: true
Size: 722 Bytes
Versions: 5
Compression:
Stored size: 722 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_verify_confirmation.deliver_later redirect_to root_path, notice: "We sent a verification email to your email address" end private def set_user @user = User.where(email: params[:email]).find_signed!(params[:token], purpose: params[:email]) rescue redirect_to edit_identity_email_path, alert: "That email verification link is invalid" end end
Version data entries
5 entries across 5 versions & 1 rubygems