summaryrefslogtreecommitdiff
path: root/app/controllers/confirmations_controller.rb
blob: 306afb65f10df40ff56eabc2b802a66dd48bd740 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class ConfirmationsController < Devise::ConfirmationsController
  def almost_there
    flash[:notice] = nil
    render layout: "devise_empty"
  end

  protected

  def after_resending_confirmation_instructions_path_for(resource)
    users_almost_there_path
  end

  def after_confirmation_path_for(resource_name, resource)
    if signed_in?(resource_name)
      after_sign_in_path_for(resource)
    else
      flash[:notice] += " Please sign in."
      new_session_path(resource_name)
    end
  end
end