Module: MetaRailsHelpers::TitleHelper
- Defined in:
- lib/meta/rails/helpers/title_helper.rb
Instance Method Summary collapse
-
#title(identifier: :title, separator: '|', brand: default_brand, reverse: false) ⇒ Object
Produces html title element.
Instance Method Details
#title(identifier: :title, separator: '|', brand: default_brand, reverse: false) ⇒ Object
Produces html title element
4 5 6 7 8 9 10 11 12 13 14 15 |
# File 'lib/meta/rails/helpers/title_helper.rb', line 4 def title(identifier: :title, separator: '|', brand: default_brand, reverse: false) title = content_for(identifier) separator = '' unless title.present? && brand.present? if reverse == true content_tag :title, [brand, separator, title].reject(&:blank?).join(' ') else content_tag :title, [title, separator, brand].reject(&:blank?).join(' ') end end |