From 434d176ebe72043e11a63a03fd5287d43bd34eb9 Mon Sep 17 00:00:00 2001 From: Georg Gadinger Date: Sat, 23 Jul 2022 12:19:47 +0200 Subject: [PATCH] appease the Cyber Canine 9000 --- app/helpers/moderation_helper.rb | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/app/helpers/moderation_helper.rb b/app/helpers/moderation_helper.rb index 46f52533..b573cc1b 100644 --- a/app/helpers/moderation_helper.rb +++ b/app/helpers/moderation_helper.rb @@ -1,18 +1,20 @@ +# frozen_string_literal: true + module ModerationHelper # @param report [Report] def content_url(report) target = report.target case report.type - when 'Reports::Answer' - answer_path target.user.screen_name, target.id - when 'Reports::Comment' - answer_path target.answer.user.screen_name, target.answer.id - when 'Reports::Question' - question_path 'user', target.id - when 'Reports::User' - user_path target - else - '#' + when "Reports::Answer" + answer_path target.user.screen_name, target.id + when "Reports::Comment" + answer_path target.answer.user.screen_name, target.answer.id + when "Reports::Question" + question_path "user", target.id + when "Reports::User" + user_path target + else + "#" end end end