module Titleist::Controller
Controller
mixins for reading titles without ActionView
Public Instance Methods
app_title()
click to toggle source
Shorthand for calling title.app
in the view.
@return [String] i18n-configured global application title.
# File lib/titleist/controller.rb, line 25 def app_title title.app end
page_title()
click to toggle source
Shorthand for calling title.page
in the view.
@return [String] i18n-configured title for the current page.
# File lib/titleist/controller.rb, line 32 def page_title title.page end
title()
click to toggle source
Generate the full page title for this request. When output into the view, the entire title is shown. You may also call title.page
or title.app
to view individual pieces of the title.
@return [Titleist::Title]
# File lib/titleist/controller.rb, line 18 def title @title ||= Title.new(**params.to_unsafe_h.deep_symbolize_keys) end