Module: Users::Controllers::ApplicationController

Defined in:
lib/users/controllers/application_controller.rb

Class Method Summary collapse

Class Method Details

.included(base) ⇒ Object



5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# File 'lib/users/controllers/application_controller.rb', line 5

def self.included(base)
  base.class_eval do
    
    private
    
    def default_admin_path
      default_user_path || root_path
    end
    
    def default_user_path
      return false unless user_signed_in?
      return '/admin/pages' if user_has_access_to_action?(:index)
      Radiant::Config["defaults.path.#{current_user.class_name.downcase}"]
    end
    
  end
end