From 1dcec6ed912b075f5bdaa069bb5725b0ff06fe41 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 19 Jun 2013 00:36:02 -0700 Subject: added html_title helper - use @title to set page title. --- app/helpers/application_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index db70109..a236a0a 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -1,5 +1,18 @@ module ApplicationHelper + # + # determine title for the page + # + def html_title + if content_for?(:title) + yield(:title) + elsif @title + [@title, ' - ', APP_CONFIG[:domain]].join + else + APP_CONFIG[:domain] + end + end + # # markup for bootstrap icon # -- cgit v1.2.3