Module: LayoutHelper

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

Instance Method Summary collapse

Instance Method Details

#set_title(title = nil, window_title = nil) ⇒ Object



2
3
4
5
6
7
8
9
10
11
# File 'lib/generators/scaffold_logic/layout/templates/layout_helper.rb', line 2

def set_title(title = nil, window_title = nil)
  window_title ||= title
  if title.nil?
    content_for(:title) { APPLICATION_NAME }
    content_for(:page_title) {  }
  else
    content_for(:title) { window_title + " - #{APPLICATION_NAME}" }
    content_for(:page_title) { title }
  end
end