confirmations_controller.rb 397 字节
Newer Older
1 2 3 4 5 6
class ConfirmationsController < Devise::ConfirmationsController

  protected

  def after_confirmation_path_for(resource_name, resource)
    if signed_in?(resource_name)
D
Douwe Maan 已提交
7
      after_sign_in_path_for(resource)
8 9 10
    else
      sign_in(resource)
      if signed_in?(resource_name)
D
Douwe Maan 已提交
11
        after_sign_in_path_for(resource)
12 13 14 15 16 17
      else
        new_session_path(resource_name)
      end
    end
  end
end