app/helpers/application_helper.rb
def page_title(title = nil)
    if title.nil?
      sub_title = content_for(:title).try do |t|
        t.truncate(50) + ' - '
      end
      "#{sub_title}#{t('shared.app.name')}"
    else
      provide(:title, title)
    end
  end
# Display/Provide page title.
Display/Provide page title.
Display / Provide page title .
def page_title(title = nil)
    if title.nil?
      sub_title = content_for(:title).try do |t|
        t.truncate(50) + ' - '
      end
      "#{sub_title}#{t('shared.app.name')}"
    else
      provide(:title, title)
    end
  end
def page_title ( title = nil ) if title . nil? sub_title = content_for ( :title ) . try do | t | t . truncate ( 50 ) + ' - ' end "#{sub_title}#{t('shared.app.name')}" else provide ( :title , title ) end end
Display/Provide page title.
Display / Provide page title .
title