Module: Tramway::Core::TitleHelper

Defined in:
app/helpers/tramway/core/title_helper.rb

Instance Method Summary collapse

Instance Method Details

#default_titleObject



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

def default_title
  t('.title')
end

#page_title(action, model_name) ⇒ Object



13
14
15
# File 'app/helpers/tramway/core/title_helper.rb', line 13

def page_title(action, model_name)
  t("helpers.actions.#{action}") + ' ' + genitive(model_name)
end

#title(page_title = default_title) ⇒ Object



4
5
6
7
# File 'app/helpers/tramway/core/title_helper.rb', line 4

def title(page_title = default_title)
  title_text = "#{page_title} | #{@application.title}"
  content_for(:title) { title_text }
end