0
0
Fork 0

Spec coverage for HomeHelper (#23907)

This commit is contained in:
Matt Jankowski 2023-03-02 04:04:14 -05:00 committed by GitHub
parent cb97ba7a2f
commit b6602f68eb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 114 additions and 10 deletions

View file

@ -41,9 +41,9 @@ module HomeHelper
def obscured_counter(count)
if count <= 0
0
'0'
elsif count == 1
1
'1'
else
'1+'
end
@ -57,14 +57,6 @@ module HomeHelper
end
end
def optional_link_to(condition, path, options = {}, &block)
if condition
link_to(path, options, &block)
else
content_tag(:div, &block)
end
end
def sign_up_message
if closed_registrations?
t('auth.registration_closed', instance: site_hostname)