From 88769c6a3cb331536cbcfa9ee63500fdd5086046 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Tue, 28 Nov 2023 10:54:06 -0500 Subject: [PATCH] Only render comment sorting for signed-in users (#20398) --- .../articles/_full_comment_area.html.erb | 50 ++++++++++--------- spec/requests/articles/articles_show_spec.rb | 8 +++ 2 files changed, 35 insertions(+), 23 deletions(-) diff --git a/app/views/articles/_full_comment_area.html.erb b/app/views/articles/_full_comment_area.html.erb index 2283243cf..6ebd21a36 100644 --- a/app/views/articles/_full_comment_area.html.erb +++ b/app/views/articles/_full_comment_area.html.erb @@ -7,31 +7,35 @@ <%= t("views.articles.comments.subtitle.#{@comments_order}_html", num: tag.span(t("views.articles.comments.num", num: @article.comments_count), class: "js-comments-count", data: { comments_count: @article.comments_count })) %> - + <% if user_signed_in? %> + + <% end %> - + <% if user_signed_in? %> + + <% end %>