Class: Ecom::Core::ApplicationController
- Inherits:
-
ActionController::API
- Object
- ActionController::API
- Ecom::Core::ApplicationController
show all
- Defined in:
- app/controllers/ecom/core/application_controller.rb
Direct Known Subclasses
AccessController, ApplicationModulesController, CompaniesController, CrewTypesController, EquipmentTypesController, MaterialTypesController, MenusController, ProjectsController, SiteCrewsController, UnitCostsController, UserRolesController, UsersController
Instance Method Summary
collapse
Instance Method Details
#current_user ⇒ Object
10
11
12
13
14
15
|
# File 'app/controllers/ecom/core/application_controller.rb', line 10
def current_user
return unless auth_present?
user = User.find(auth['id'])
@current_user ||= user if user
end
|
#logged_in? ⇒ Boolean
6
7
8
|
# File 'app/controllers/ecom/core/application_controller.rb', line 6
def logged_in?
!current_user.nil?
end
|