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

Version Path
authentication-zero-2.16.4 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.16.3 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.16.2 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.16.1 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.16.0 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.9 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.8 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.7 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.6 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.5 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.4 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.3 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.2 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.1 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.15.0 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.14.0 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt
authentication-zero-2.13.0 lib/generators/authentication/templates/controllers/html/identity/email_verifications_controller.rb.tt