BigW Consortium Gitlab

confirmations_controller.rb 584 Bytes
Newer Older
1 2
class ConfirmationsController < Devise::ConfirmationsController

Phil Hughes committed
3 4 5 6 7
  def almost_there
    flash[:notice] = nil
    render layout: "devise_empty"
  end

8 9
  protected

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

14 15
  def after_confirmation_path_for(resource_name, resource)
    if signed_in?(resource_name)
Douwe Maan committed
16
      after_sign_in_path_for(resource)
17 18 19
    else
      sign_in(resource)
      if signed_in?(resource_name)
Douwe Maan committed
20
        after_sign_in_path_for(resource)
21 22 23 24 25 26
      else
        new_session_path(resource_name)
      end
    end
  end
end