BigW Consortium Gitlab

confirmations_controller.rb 568 Bytes
Newer Older
1
class ConfirmationsController < Devise::ConfirmationsController
Phil Hughes committed
2 3 4 5 6
  def almost_there
    flash[:notice] = nil
    render layout: "devise_empty"
  end

7 8
  protected

Phil Hughes committed
9 10 11 12
  def after_resending_confirmation_instructions_path_for(resource)
    users_almost_there_path
  end

13 14
  def after_confirmation_path_for(resource_name, resource)
    if signed_in?(resource_name)
15
      after_sign_in(resource)
16
    else
17 18
      flash[:notice] += " Please sign in."
      new_session_path(resource_name)
19 20
    end
  end
21 22 23 24

  def after_sign_in(resource)
    after_sign_in_path_for(resource)
  end
25
end