Module: Kaui::ApplicationHelper
- Defined in:
- app/helpers/kaui/application_helper.rb
Instance Method Summary collapse
Instance Method Details
#tenant_selected? ⇒ Boolean
5 6 7 |
# File 'app/helpers/kaui/application_helper.rb', line 5 def tenant_selected? session[:kb_tenant_id].present? end |
#truncate_class_name(klass, with_abbr) ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'app/helpers/kaui/application_helper.rb', line 9 def truncate_class_name(klass, with_abbr) splitted = klass.split('.') if with_abbr splitted.each_with_index.map { |k, idx| idx == splitted.size - 1 ? k : "#{k[0]}." }.join else splitted[-1] end end |