From 389f8f824909d60b7560248465416bd4bed92b6b Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Mon, 17 Apr 2017 18:16:32 -0400 Subject: Instance helper to replace site title helper (#2038) * Move site title helper to instance helper (name change only) * Remove newline in tag * Add site_hostname helper method to wrap up local_domain value * Use site_hostname helper in places that need local_domain value --- app/helpers/instance_helper.rb | 11 +++++++++++ app/helpers/site_title_helper.rb | 7 ------- 2 files changed, 11 insertions(+), 7 deletions(-) create mode 100644 app/helpers/instance_helper.rb delete mode 100644 app/helpers/site_title_helper.rb (limited to 'app/helpers') diff --git a/app/helpers/instance_helper.rb b/app/helpers/instance_helper.rb new file mode 100644 index 000000000..a1c3c3521 --- /dev/null +++ b/app/helpers/instance_helper.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +module InstanceHelper + def site_title + Setting.site_title.to_s + end + + def site_hostname + Rails.configuration.x.local_domain + end +end diff --git a/app/helpers/site_title_helper.rb b/app/helpers/site_title_helper.rb deleted file mode 100644 index d2caa9203..000000000 --- a/app/helpers/site_title_helper.rb +++ /dev/null @@ -1,7 +0,0 @@ -# frozen_string_literal: true - -module SiteTitleHelper - def site_title - Setting.site_title.to_s - end -end -- cgit