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