Class: Title::TitleHelper::PageTitle
- Inherits:
-
Object
- Object
- Title::TitleHelper::PageTitle
- Defined in:
- app/helpers/title/title_helper.rb
Instance Method Summary collapse
-
#initialize(controller_path, action_name, context) ⇒ PageTitle
constructor
A new instance of PageTitle.
- #to_s ⇒ Object
Constructor Details
#initialize(controller_path, action_name, context) ⇒ PageTitle
Returns a new instance of PageTitle.
9 10 11 12 13 |
# File 'app/helpers/title/title_helper.rb', line 9 def initialize(controller_path, action_name, context) @controller_path = controller_path @action_name = adjusted_action_name(action_name) @context = context end |
Instance Method Details
#to_s ⇒ Object
15 16 17 18 19 20 |
# File 'app/helpers/title/title_helper.rb', line 15 def to_s I18n.t( [:titles, controller_name, action_name].join('.'), **safe_context.merge(default: defaults) ) end |