Sha256: 782ecdb447a93219ac0d691abb9dbc4715ee24d8a7ff79ef8f13ca4564dd6a6d

Contents?: true

Size: 578 Bytes

Versions: 3

Compression:

Stored size: 578 Bytes

Contents

class ConfirmationsController < ApplicationController
  include Devise::Controllers::InternalHelpers
  include Devise::Controllers::Common

  # GET /resource/confirmation?confirmation_token=abcdef
  def show
    self.resource = resource_class.confirm!(:confirmation_token => params[:confirmation_token])

    if resource.errors.empty?
      set_flash_message :notice, :confirmed
      sign_in_and_redirect(resource_name, resource)
    else
      render_with_scope :new
    end
  end

  protected

    def send_instructions_with
      :send_confirmation_instructions
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
devise-0.9.2 app/controllers/confirmations_controller.rb
devise-0.9.1 app/controllers/confirmations_controller.rb
devise-0.9.0 app/controllers/confirmations_controller.rb