Sha256: 305496175d39ed53b0da6cc6102430d3f1f7617cea6ec4108796de9a5df3e6a5

Contents?: true

Size: 657 Bytes

Versions: 4

Compression:

Stored size: 657 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 Campagne
  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
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
campagne-0.1.2 app/helpers/campagne/layout_helper.rb
campagne-0.1.1 app/helpers/campagne/layout_helper.rb
campagne-0.1.0 app/helpers/campagne/layout_helper.rb
campagne-0.0.2 app/helpers/campagne/layout_helper.rb