Sha256: 970b0e269e688c52f94c12c2e2114647f3c7ba34ba32f5c55d2a4e75a5534705

Contents?: true

Size: 599 Bytes

Versions: 18

Compression:

Stored size: 599 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 = 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

18 entries across 18 versions & 4 rubygems

Version Path
flockonus-nifty-generators-0.0.12 rails_generators/nifty_layout/templates/helper.rb
nifty-generators-0.4.6 rails_generators/nifty_layout/templates/helper.rb
flockonus-nifty-generators-0.0.11 rails_generators/nifty_layout/templates/helper.rb
flockonus-nifty-generators-0.0.10 rails_generators/nifty_layout/templates/helper.rb
flockonus-nifty-generators-0.0.9 rails_generators/nifty_layout/templates/helper.rb
nifty-generators-0.4.5 rails_generators/nifty_layout/templates/helper.rb
flockonus-nifty-generators-0.0.8 rails_generators/nifty_layout/templates/helper.rb
flockonus-nifty-generators-0.0.7 rails_generators/nifty_layout/templates/helper.rb
flockonus-nifty-generators-0.0.6 rails_generators/nifty_layout/templates/helper.rb
nifty-generators-0.4.4 rails_generators/nifty_layout/templates/helper.rb
nifty-generators-0.4.3 rails_generators/nifty_layout/templates/helper.rb
nifty-generators-0.4.2 rails_generators/nifty_layout/templates/helper.rb
nifty-generators-0.4.1 rails_generators/nifty_layout/templates/helper.rb
splendeo-generators-0.3.1 rails_generators/splendeo_layout/templates/helper.rb
splendeo-generators-0.3.0 rails_generators/splendeo_layout/templates/helper.rb
solarsearch-0.0.10 app/helpers/layout_helper.rb
solarsearch-0.0.9 app/helpers/layout_helper.rb
solarsearch-0.0.6 app/helpers/layout_helper.rb