Module: LayoutHelper

Defined in:
lib/generators/nifty/layout/templates/layout_helper.rb

Overview

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

Instance Method Summary collapse

Instance Method Details

#javascript(*args) ⇒ Object



14
15
16
# File 'lib/generators/nifty/layout/templates/layout_helper.rb', line 14

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

#stylesheet(*args) ⇒ Object



10
11
12
# File 'lib/generators/nifty/layout/templates/layout_helper.rb', line 10

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

#title(page_title) ⇒ Object



6
7
8
# File 'lib/generators/nifty/layout/templates/layout_helper.rb', line 6

def title(page_title)
  content_for(:title) { h(page_title.to_s) }
end