appease the Cyber Canine 9000
This commit is contained in:
parent
1c546bc0bb
commit
434d176ebe
|
@ -1,18 +1,20 @@
|
||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module ModerationHelper
|
module ModerationHelper
|
||||||
# @param report [Report]
|
# @param report [Report]
|
||||||
def content_url(report)
|
def content_url(report)
|
||||||
target = report.target
|
target = report.target
|
||||||
case report.type
|
case report.type
|
||||||
when 'Reports::Answer'
|
when "Reports::Answer"
|
||||||
answer_path target.user.screen_name, target.id
|
answer_path target.user.screen_name, target.id
|
||||||
when 'Reports::Comment'
|
when "Reports::Comment"
|
||||||
answer_path target.answer.user.screen_name, target.answer.id
|
answer_path target.answer.user.screen_name, target.answer.id
|
||||||
when 'Reports::Question'
|
when "Reports::Question"
|
||||||
question_path 'user', target.id
|
question_path "user", target.id
|
||||||
when 'Reports::User'
|
when "Reports::User"
|
||||||
user_path target
|
user_path target
|
||||||
else
|
else
|
||||||
'#'
|
"#"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue