Browse Source

Fallback to site_hostname when site_title is empty (#4394)

pull/4/head
Yamagishi Kazutoshi 6 years ago
committed by Eugen Rochko
parent
commit
bb96ba13cf
2 changed files with 2 additions and 2 deletions
  1. +1
    -1
      app/helpers/instance_helper.rb
  2. +1
    -1
      spec/helpers/instance_helper_spec.rb

+ 1
- 1
app/helpers/instance_helper.rb View File

@ -2,7 +2,7 @@
module InstanceHelper
def site_title
Setting.site_title.to_s
Setting.site_title.presence || site_hostname
end
def site_hostname

+ 1
- 1
spec/helpers/instance_helper_spec.rb View File

@ -19,7 +19,7 @@ describe InstanceHelper do
it 'returns empty string when Setting.site_title is nil' do
Setting.site_title = nil
expect(helper.site_title).to eq ''
expect(helper.site_title).to eq 'cb6e6126.ngrok.io'
end
end

Loading…
Cancel
Save