Sha256: 06a9b27bb89b842ae17a941f41c088d9fe8ecdc68781f661cfb7c4d7f001fdf2

Contents?: true

Size: 605 Bytes

Versions: 83

Compression:

Stored size: 605 Bytes

Contents

# These helper methods can be called in your template to set variables to be used in the layout
# This module should be included in all views globally,
# to do so you may need to add this line to your ApplicationController
#   helper :layout
module LayoutHelper
  def title(page_title, show_title = true)
    content_for(:title) { h(page_title.to_s) }
    @show_title = show_title
  end

  def show_title?
    @show_title
  end

  def stylesheet(*args)
    content_for(:head) { stylesheet_link_tag(*args) }
  end

  def javascript(*args)
    content_for(:head) { javascript_include_tag(*args) }
  end
end

Version data entries

83 entries across 83 versions & 20 rubygems

Version Path
edit_mode-1.0.5 test_app/app/helpers/layout_helper.rb
edit_mode-1.0.4 test_app/app/helpers/layout_helper.rb
edit_mode-1.0.3 test_app/app/helpers/layout_helper.rb
aslon_scaffold-0.0.15 lib/generators/nifty/layout/templates/layout_helper.rb
aslon_scaffold-0.0.14 lib/generators/nifty/layout/templates/layout_helper.rb
aslon_scaffold-0.0.13 lib/generators/nifty/layout/templates/layout_helper.rb
edit_mode-1.0.2 test_app/app/helpers/layout_helper.rb
edit_mode-1.0.1 test_app/app/helpers/layout_helper.rb
workflow_kit-0.0.8 test_app/app/helpers/layout_helper.rb
workflow_kit-0.0.7 test_app/app/helpers/layout_helper.rb
edit_mode-1.0.0 test_app/app/helpers/layout_helper.rb
workflow_kit-0.0.6.alpha test_app/app/helpers/layout_helper.rb
tripper-0.0.3d lib/generators/tripper/layout/templates/layout_helper.rb
edit_mode-0.0.9 test_app/app/helpers/layout_helper.rb
edit_mode-0.0.8 test_app/app/helpers/layout_helper.rb
slim_breadcrumb-0.0.3 test_app/app/helpers/layout_helper.rb
aslon_scaffold-0.0.12 lib/generators/nifty/layout/templates/layout_helper.rb
edit_mode-0.0.7 test_app/app/helpers/layout_helper.rb
slim_breadcrumb-0.0.2 test_app/app/helpers/layout_helper.rb
edit_mode-0.0.6 test_app/app/helpers/layout_helper.rb