Module: Motor::CurrentUserMethod

Included in:
ApiBaseController, ApplicationController
Defined in:
app/controllers/concerns/motor/current_user_method.rb

Instance Method Summary collapse

Instance Method Details

#current_userObject


5
6
7
8
9
10
11
12
13
14
# File 'app/controllers/concerns/motor/current_user_method.rb', line 5

def current_user
  @current_user ||=
    if defined?(current_admin)
      current_admin
    elsif defined?(current_admin_user)
      current_admin_user
    elsif defined?(super)
      super
    end
end