This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
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
5bf4838e2f
commit
bb96ba13cf
2 changed files
with
2 additions
and
2 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app/helpers/instance_helper.rb
+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
Write
Preview
Loading…
Cancel
Save