Sha256: 97339ee2d42c58976f6f9dd45dab3207ce19e1ea2d8d4c5848f18f943ee6775d

Contents?: true

Size: 426 Bytes

Versions: 10

Compression:

Stored size: 426 Bytes

Contents

module DfmWebHelper

  # Extract the host application's name and titlecase it.
  # Should `titlecase` incorrectly capitalize your app, add it
  # as an acronym in your inflections.rb
  # > inflect.acronym("HRMed")
  def host_application_title
    if Rails::VERSION::MAJOR >= 6
      Rails.application.class.module_parent_name.to_s.titlecase
    else
      Rails.application.class.parent_name.to_s.titlecase
    end
  end

end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
dfm_web-5.0.4 app/helpers/dfm_web_helper.rb
dfm_web-5.0.3 app/helpers/dfm_web_helper.rb
dfm_web-5.0.2 app/helpers/dfm_web_helper.rb
dfm_web-5.0.1 app/helpers/dfm_web_helper.rb
dfm_web-5.0.0 app/helpers/dfm_web_helper.rb
dfm_web-4.1.3 app/helpers/dfm_web_helper.rb
dfm_web-4.1.2 app/helpers/dfm_web_helper.rb
dfm_web-4.1.1 app/helpers/dfm_web_helper.rb
dfm_web-4.1.0 app/helpers/dfm_web_helper.rb
dfm_web-4.0.7 app/helpers/dfm_web_helper.rb