From e64f206f5be3373617b357ad82505bc62f87ebb7 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 26 Jun 2022 20:59:53 +0200 Subject: [PATCH] Replace `anonymous_identifier` with `author_identifier` --- app/helpers/user_helper.rb | 8 ++++---- app/views/question/_question.haml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/helpers/user_helper.rb b/app/helpers/user_helper.rb index 142fd78c..9cde2771 100644 --- a/app/helpers/user_helper.rb +++ b/app/helpers/user_helper.rb @@ -27,14 +27,14 @@ module UserHelper link_to(user.profile.safe_name, show_user_profile_path(user.screen_name), class: ("user--banned" if user.banned?).to_s) end - def should_unmask?(anonymous_identifier) - moderation_view? && anonymous_identifier.present? + def should_unmask?(author_identifier) + moderation_view? && author_identifier.present? end - def unmask(user, context_user, anonymous_identifier) + def unmask(user, context_user, author_identifier) return profile_link(user) if user.present? - content_tag(:abbr, anonymous_name(context_user), title: anonymous_identifier) + content_tag(:abbr, anonymous_name(context_user), title: author_identifier) end def anonymous_name(context_user) diff --git a/app/views/question/_question.haml b/app/views/question/_question.haml index 8ba363a6..0a3677fa 100644 --- a/app/views/question/_question.haml +++ b/app/views/question/_question.haml @@ -27,7 +27,7 @@ = t 'views.actions.report' %h6.text-muted.media-heading.answerbox__question-user - if hidden - = user_screen_name question.user, anonymous_identifier: question.author_identifier, url: false + = user_screen_name question.user, author_identifier: question.author_identifier, url: false - else = raw t('views.answerbox.asked', user: user_screen_name(question.user, author_identifier: question.author_identifier), time: time_tooltip(question)) .answerbox__question-text= question_markdown question.content