Skip to content
Extraits de code Groupes Projets
Valider a6c3f67b rédigé par Lukas Matt's avatar Lukas Matt
Parcourir les fichiers

Check if post or comment exist while rendering


It is possible that the item was deleted
during the time it was reported and the admin review

Signed-off-by: default avatarLukas Matt <lukas@zauberstuhl.de>
parent 95072d60
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -7,7 +7,10 @@ class ReportController < ApplicationController
before_action :redirect_unless_moderator, except: [:create]
def index
@reports = Report.where(reviewed: false)
@reports ||= []
Report.where(reviewed: false).each do |report|
@reports << report unless report.item.nil?
end
end
def update
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter