Class: OnboardOnRails::Admin::BaseController
- Inherits:
-
OnboardOnRails::ApplicationController
- Object
- ActionController::Base
- OnboardOnRails::ApplicationController
- OnboardOnRails::Admin::BaseController
- Defined in:
- app/controllers/onboard_on_rails/admin/base_controller.rb
Direct Known Subclasses
LessonsController, StatsController, StepsController, ToursController, SelectorPickerController
Instance Method Summary collapse
Instance Method Details
#current_user ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/controllers/onboard_on_rails/admin/base_controller.rb', line 7 def current_user @current_user ||= begin method_name = OnboardOnRails.configuration.current_user_method host_controller = ::ApplicationController.new host_controller.request = request if host_controller.respond_to?(:request=) host_controller.send(method_name) if host_controller.respond_to?(method_name, true) rescue => e Rails.logger.error "[OnboardOnRails] Failed to get current_user: #{e.}" nil end end |