Sha256: e1a6af7e3833bd34ef06822b0e96ab2a6be32b99118e1ebcaceefb338a124b75

Contents?: true

Size: 424 Bytes

Versions: 38

Compression:

Stored size: 424 Bytes

Contents

module JefferiesTube::ApplicationHelper
  def naive_page_title
    return @page_title if @page_title
    controller = params[:controller]

    title = case params[:action]
    when "new"
      "New #{controller.singularize.titlecase}"
    when "edit"
      "Editing #{controller.singularize.titlecase}"
    when "index"
      "Manage #{controller.titlecase}"
    else
      controller.titlecase
    end

    title
  end
end

Version data entries

38 entries across 38 versions & 1 rubygems

Version Path
jefferies_tube-1.7.1 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.7.0 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.9 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.8 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.7 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.6 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.5 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.4 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.3.2 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.3.1 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.3 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.2 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.1 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.6.0 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.5.4 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.5.3 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.5.2 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.5 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.4 app/helpers/jefferies_tube/application_helper.rb
jefferies_tube-1.3 app/helpers/jefferies_tube/application_helper.rb