Module: ExceptionHunter::SessionsHelper

Defined in:
app/helpers/exception_hunter/sessions_helper.rb

Instance Method Summary collapse

Instance Method Details

#current_admin_class_name(class_name) ⇒ Object



12
13
14
# File 'app/helpers/exception_hunter/sessions_helper.rb', line 12

def current_admin_class_name(class_name)
  send("current_#{class_name.underscore}")
end

#current_admin_user?Boolean

Returns:

  • (Boolean)


3
4
5
6
# File 'app/helpers/exception_hunter/sessions_helper.rb', line 3

def current_admin_user?
  underscored_admin_user_class &&
    current_admin_class_name(underscored_admin_user_class)
end

#underscored_admin_user_classObject



8
9
10
# File 'app/helpers/exception_hunter/sessions_helper.rb', line 8

def underscored_admin_user_class
  ExceptionHunter::Config.admin_user_class.try(:underscore)
end