diff options
author | Matt Jankowski <mjankowski@thoughtbot.com> | 2017-04-17 18:16:32 -0400 |
---|---|---|
committer | Eugen <eugen@zeonfederated.com> | 2017-04-18 00:16:32 +0200 |
commit | 389f8f824909d60b7560248465416bd4bed92b6b (patch) | |
tree | 182b37bee6b43d9da4c2b498448aa37eaec4eced /app/helpers | |
parent | e1e15adf1d994dda0fa868bcdd55cb8603d6f1ef (diff) |
Instance helper to replace site title helper (#2038)
* Move site title helper to instance helper (name change only) * Remove newline in <title> tag * Add site_hostname helper method to wrap up local_domain value * Use site_hostname helper in places that need local_domain value
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/instance_helper.rb | 11 | ||||
-rw-r--r-- | app/helpers/site_title_helper.rb | 7 |
2 files changed, 11 insertions, 7 deletions
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 |