Module: Trestle::TitleHelper

Defined in:
app/helpers/trestle/title_helper.rb

Instance Method Summary collapse

Instance Method Details

#default_titleObject



9
10
11
# File 'app/helpers/trestle/title_helper.rb', line 9

def default_title
  action_name.titleize
end

#titleObject

Returns the page title (if set using content_for), falling back to the titleized action name as a default if not set.



5
6
7
# File 'app/helpers/trestle/title_helper.rb', line 5

def title
  content_for(:title) || default_title
end