# frozen_string_literal: true
module ApplicationHelper
def federal_subjects_controller?
controller_path == 'federal_subjects'
end
def staff_controller?
controller_path.start_with?('staff')
def translate_enum(type, value)
translate value, scope: [:enums, type]
def bootstrap_class_for_flash(flash_type)
case flash_type
when 'success'
'alert-success'
when 'error', 'recaptcha_error'
'alert-danger'
when 'alert'
'alert-warning'
else
'alert-info'