Apply review suggestion from @nilsding
Co-authored-by: Georg Gadinger <nilsding@nilsding.org>
This commit is contained in:
parent
175ad4a83b
commit
ff811edfe6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue