demarches-normaliennes/app/controllers/users/confirmations_controller.rb
2018-05-23 15:55:52 +02:00

38 lines
792 B
Ruby

# frozen_string_literal: true
class Users::ConfirmationsController < Devise::ConfirmationsController
# GET /resource/confirmation/new
# def new
# super
# end
# POST /resource/confirmation
# def create
# super
# end
# GET /resource/confirmation?confirmation_token=abcdef
# def show
# super
# end
protected
# The path used after resending confirmation instructions.
# def after_resending_confirmation_instructions_path_for(resource_name)
# super(resource_name)
# end
# The path used after confirmation.
def after_confirmation_path_for(resource_name, resource)
check_invite!(resource)
super(resource_name, resource)
end
private
def check_invite!(user)
Invite.where(email: user.email).update_all user_id: user.id
end
end