From 2ee25d264f327a5ae5473d0edf9da98a08b95b57 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Tue, 7 Feb 2023 23:20:47 +0100 Subject: [PATCH] Simplify pinned check in answerbox This is hidden by CSS in the prior case anyway --- app/views/application/_answerbox.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/application/_answerbox.html.haml b/app/views/application/_answerbox.html.haml index e6b9504b..20b88963 100644 --- a/app/views/application/_answerbox.html.haml +++ b/app/views/application/_answerbox.html.haml @@ -27,7 +27,7 @@ .col-md-6.text-start.text-muted %i.fa.fa-clock-o = link_to(raw(t("time.distance_ago", time: time_tooltip(a))), answer_path(a.user.screen_name, a.id), class: "answerbox__permalink") - - if instance_variable_defined?(:@user) && @user == a.user && a.pinned_at.present? + - if a.pinned_at.present? %span.answerbox__pinned ยท %i.fa.fa-thumbtack