From 47027300607a0eb0127aa408fff508e56ad64021 Mon Sep 17 00:00:00 2001 From: Anton Khorev Date: Mon, 8 Jan 2024 16:21:02 +0300 Subject: [PATCH 1/1] Simplify moderator check when showing changeset comments --- app/views/browse/changeset.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/browse/changeset.html.erb b/app/views/browse/changeset.html.erb index ef30f8214..208ddbd46 100644 --- a/app/views/browse/changeset.html.erb +++ b/app/views/browse/changeset.html.erb @@ -36,7 +36,7 @@ <%= t(".comment_by_html", :time_ago => friendly_date_ago(comment.created_at), :user => link_to(comment.author.display_name, user_path(comment.author))) %> - <% if current_user and current_user.moderator? %> + <% if current_user&.moderator? %> — <% end %> @@ -44,7 +44,7 @@ <%= comment.body.to_html %> - <% elsif current_user and current_user.moderator? %> + <% elsif current_user&.moderator? %>
  • <%= t(".hidden_comment_by_html", -- 2.39.5