Module: Neuron::Navigation::View

Defined in:
lib/neuron/navigation.rb

Instance Method Summary collapse

Instance Method Details

#head_title(title = nil, options = {}) ⇒ Object



60
61
62
# File 'lib/neuron/navigation.rb', line 60

def head_title(title = nil, options = {})
  neuron_title.head_title(title, options)
end


56
57
58
# File 'lib/neuron/navigation.rb', line 56

def navigation_title(title = nil, options = {})
  neuron_title.navigation_title(title, options)
end

#page_title(title = nil, options = {}) ⇒ Object

Title of the current page

Parameters:

  • title (String, nil) (defaults to: nil)

    title to set

  • options (Hash) (defaults to: {})

    options to I18n#translate if building default title



52
53
54
# File 'lib/neuron/navigation.rb', line 52

def page_title(title = nil, options = {})
  neuron_title.page_title(title, options).html_safe
end

#title(new_title = nil, options = {}) ⇒ Object



64
65
66
67
# File 'lib/neuron/navigation.rb', line 64

def title(new_title = nil, options = {})
  tag = options.delete(:tag) { :h1 }
  (tag, page_title(new_title, options))
end