From 17dd57bb67d879fba73faf0d12363900079cd45d Mon Sep 17 00:00:00 2001 From: Ashley Date: Fri, 28 Apr 2017 01:17:55 +1200 Subject: [PATCH] Added '(dev)' to the title in development mode (#2524) * Added different title for dev * Changed indentation --- app/helpers/application_helper.rb | 4 ++++ app/views/layouts/application.html.haml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d25b12998a..14c7447c05 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -18,4 +18,8 @@ module ApplicationHelper env_suffix = Rails.env.production? ? '' : '-dev' asset_path "favicon#{env_suffix}.ico" end + + def title + Rails.env.production? ? site_title : "#{site_title} (Dev)" + end end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 01c42db935..602d502a9e 100755 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -17,7 +17,7 @@ - if content_for?(:page_title) = yield(:page_title) = ' - ' - = site_title + = title = stylesheet_link_tag stylesheet_for_layout, media: 'all' = csrf_meta_tags