Apply review suggestion from @nilsding

Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
Andreas Nedbal 2022-12-18 21:58:06 +01:00
parent 175ad4a83b
commit ff811edfe6
1 changed files with 1 additions and 1 deletions

View File

@ -22,7 +22,7 @@ module ApplicationHelper
def notification_count def notification_count
return 0 unless user_signed_in? 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? return nil unless count.positive?
count count