summaryrefslogtreecommitdiff
path: root/app/controllers/confirmations_controller.rb
blob: bc98eab133c4e5e69c42e5d9769163643107ae2c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class ConfirmationsController < Devise::ConfirmationsController

  protected

  def after_confirmation_path_for(resource_name, resource)
    if signed_in?(resource_name)
      signed_in_root_path(resource)
    else
      sign_in(resource)
      if signed_in?(resource_name)
        signed_in_root_path(resource)
      else
        new_session_path(resource_name)
      end
    end
  end
end