Sha256: ac419733da84bf53a816e67c93536034416c585c97bdaafbdb3386c95ded5229

Contents?: true

Size: 608 Bytes

Versions: 5

Compression:

Stored size: 608 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

5 entries across 5 versions & 1 rubygems

Version Path
very_nifty_generators-0.2.1 lib/generators/nifty/layout/templates/helper.rb
very_nifty_generators-0.2.0 lib/generators/nifty/layout/templates/helper.rb
very_nifty_generators-0.1.2 lib/generators/nifty/layout/templates/helper.rb
very_nifty_generators-0.1.1 lib/generators/nifty/layout/templates/helper.rb
very_nifty_generators-0.1.0 lib/generators/nifty/layout/templates/helper.rb