Class: LayersOfLondon::Booth::MapTool::ApplicationController
- Inherits:
-
ActionController::Base
- Object
- ActionController::Base
- LayersOfLondon::Booth::MapTool::ApplicationController
- Includes:
- Pundit
- Defined in:
- app/controllers/layers_of_london/booth/map_tool/application_controller.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#session ⇒ Object
def current_user byebug main_app.scope.request.env.user end.
Instance Method Details
#session ⇒ Object
def current_user
byebug
main_app.scope.request.env['warden'].user
end
20 21 22 23 24 25 26 27 28 29 30 31 |
# File 'app/controllers/layers_of_london/booth/map_tool/application_controller.rb', line 20 def session return render json: {} unless current_user.present? render json: { id: current_user.id, email: current_user.email, title: current_user.title, first_name: current_user.first_name, last_name: current_user.last_name, role: current_user.role } end |