Module: Clearance::App::Controllers::ApplicationController::InstanceMethods

Defined in:
lib/clearance/app/controllers/application_controller.rb

Instance Method Summary collapse

Instance Method Details

#current_userObject



19
20
21
# File 'lib/clearance/app/controllers/application_controller.rb', line 19

def current_user
  @current_user ||= (user_from_session || user_from_cookie)
end

#logged_in?Boolean

Returns:

  • (Boolean)


23
24
25
# File 'lib/clearance/app/controllers/application_controller.rb', line 23

def logged_in?
  ! current_user.nil?
end