From 92c9ed011ff19bb46c265d484ffc1f9d4cacb849 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 1 Mar 2024 22:23:44 +0100 Subject: [PATCH] Fix rubocop nits --- app/controllers/application_controller.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 67ee3571..cfd2fcc6 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -53,11 +53,11 @@ class ApplicationController < ActionController::Base return unless current_user&.mod? @has_new_reports = if current_user.last_reports_visit.nil? - true + true else - Report.where(deleted: false) - .where("created_at > ?", current_user.last_reports_visit) - .count > 0 + Report.where(deleted: false) + .where("created_at > ?", current_user.last_reports_visit) + .count.positive? end end