Sha256: 346353fac2fdb20026ad9c59529efde393719a4145b05c594cbe064bfdbf2f50

Contents?: true

Size: 338 Bytes

Versions: 20

Compression:

Stored size: 338 Bytes

Contents

module Kaui
  module ApplicationHelper

    def tenant_selected?
      session[:kb_tenant_id].present?
    end

    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
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
kaui-2.1.0 app/helpers/kaui/application_helper.rb
kaui-2.0.4 app/helpers/kaui/application_helper.rb
kaui-2.0.3 app/helpers/kaui/application_helper.rb
kaui-2.0.2 app/helpers/kaui/application_helper.rb
kaui-2.0.1 app/helpers/kaui/application_helper.rb
kaui-2.0.0 app/helpers/kaui/application_helper.rb
kaui-1.4.1 app/helpers/kaui/application_helper.rb
kaui-1.4.0 app/helpers/kaui/application_helper.rb
kaui-1.3.0 app/helpers/kaui/application_helper.rb
kaui-1.2.0 app/helpers/kaui/application_helper.rb
kaui-1.1.0 app/helpers/kaui/application_helper.rb
kaui-1.0.0 app/helpers/kaui/application_helper.rb
kaui-0.16.2 app/helpers/kaui/application_helper.rb
kaui-0.16.1 app/helpers/kaui/application_helper.rb
kaui-0.16.0 app/helpers/kaui/application_helper.rb
kaui-0.15.5 app/helpers/kaui/application_helper.rb
kaui-0.15.4 app/helpers/kaui/application_helper.rb
kaui-0.15.3 app/helpers/kaui/application_helper.rb
kaui-0.15.2 app/helpers/kaui/application_helper.rb
kaui-0.15.1 app/helpers/kaui/application_helper.rb