module Titleizer
Constants
- VERSION
Public Instance Methods
title(preferred_title)
click to toggle source
# File lib/titleizer/base.rb, line 2 def title(preferred_title) preferred_title = nil if preferred_title.empty? title = Title.new(title_key, title_options, preferred_title, root_title?) title.to_s end
Private Instance Methods
root_title?()
click to toggle source
# File lib/titleizer/base.rb, line 19 def root_title? current_page?(root_path) end
title_key()
click to toggle source
# File lib/titleizer/base.rb, line 11 def title_key "#{controller_name}.#{action_name}" end
title_options()
click to toggle source
# File lib/titleizer/base.rb, line 15 def title_options controller.view_assigns.fetch('title_params', {}).merge(default: '') end