From ff811edfe67c97ddceb1d5196853f887f78406d1 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 18 Dec 2022 21:58:06 +0100 Subject: [PATCH] Apply review suggestion from @nilsding Co-authored-by: Georg Gadinger --- app/helpers/application_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0f75d29d..5c69fa9c 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -22,7 +22,7 @@ module ApplicationHelper def notification_count return 0 unless user_signed_in? - count = Notification.for(current_user).where(new: true).pluck(:id).size + count = Notification.for(current_user).where(new: true).count return nil unless count.positive? count