confirmations_controller.rb 583 字节
Newer Older
1
class ConfirmationsController < Devise::ConfirmationsController
P
Phil Hughes 已提交
2 3 4 5 6
  def almost_there
    flash[:notice] = nil
    render layout: "devise_empty"
  end

7 8
  protected

P
Phil Hughes 已提交
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)
D
Douwe Maan 已提交
15
      after_sign_in_path_for(resource)
16 17 18
    else
      sign_in(resource)
      if signed_in?(resource_name)
D
Douwe Maan 已提交
19
        after_sign_in_path_for(resource)
20 21 22 23 24 25
      else
        new_session_path(resource_name)
      end
    end
  end
end