diff --git a/app/controllers/moderation/reports_controller.rb b/app/controllers/moderation/reports_controller.rb index 3bf50ef7..7d29d1b2 100644 --- a/app/controllers/moderation/reports_controller.rb +++ b/app/controllers/moderation/reports_controller.rb @@ -4,6 +4,7 @@ class Moderation::ReportsController < ApplicationController before_action :authenticate_user! before_action :set_filter_enabled before_action :set_type_options + before_action :set_last_reports_visit def index filter = ReportFilter.new(filter_params) @@ -39,4 +40,9 @@ class Moderation::ReportsController < ApplicationController [t("activerecord.models.user.one"), :user] ] end + + def set_last_reports_visit + current_user.last_reports_visit = DateTime.now + current_user.save + end end