From fc276404680a71248fbac3428b196bdd31c26e37 Mon Sep 17 00:00:00 2001 From: flaburgan Date: Fri, 7 Jul 2017 20:03:41 +0200 Subject: [PATCH] Always link comment count text on mobile --- app/helpers/mobile_helper.rb | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/app/helpers/mobile_helper.rb b/app/helpers/mobile_helper.rb index 818568bc7..ef3d184e5 100644 --- a/app/helpers/mobile_helper.rb +++ b/app/helpers/mobile_helper.rb @@ -43,15 +43,12 @@ module MobileHelper entypo_class = "entypo-chevron-down" end - if post.comments_count > 0 - link_to "#{t('admins.stats.comments', count: post.comments_count)}".html_safe, - post_comments_path(post, format: "mobile"), - class: "show-comments #{klass}" - else - html = "" - html << t("admins.stats.comments", count: post.comments_count) - html << "" - end + link_to safe_join([ + t("admins.stats.comments", count: post.comments_count), + content_tag(:i, nil, class: entypo_class) + ]), + post_comments_path(post, format: "mobile"), + class: "show-comments #{klass}" end def additional_photos