Class: AbAdmin::Devise::SessionsController

Inherits:
Devise::SessionsController
  • Object
show all
Includes:
Controller
Defined in:
lib/ab_admin/devise.rb

Instance Method Summary collapse

Instance Method Details

#after_sign_in_path_for(resource) ⇒ Object


24
25
26
27
28
29
30
31
# File 'lib/ab_admin/devise.rb', line 24

def (resource)
  stored_location_for(resource) ||
      if resource.is_a?(User) && resource.admin_access?
        admin_root_path
      else
        super
      end
end