Module: Koi::Controller::HasAdminUsers

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/koi/controller/has_admin_users.rb

Defined Under Namespace

Modules: Test

Instance Method Summary collapse

Instance Method Details

#admin_signed_in?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/controllers/concerns/koi/controller/has_admin_users.rb', line 14

def admin_signed_in?
  current_admin_user.present?
end

#current_admin_userObject Also known as: current_admin



18
19
20
# File 'app/controllers/concerns/koi/controller/has_admin_users.rb', line 18

def current_admin_user
  @current_admin_user ||= Admin::User.find(session[:admin_user_id]) if session[:admin_user_id].present?
end