From 55b2a98450bdf36845000d12d185adc56972e8d4 Mon Sep 17 00:00:00 2001 From: Georg G Date: Sun, 19 Apr 2015 17:07:35 +0200 Subject: [PATCH] fixed notification badge fuckup --- app/views/notifications/_notification_tabs.html.haml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/notifications/_notification_tabs.html.haml b/app/views/notifications/_notification_tabs.html.haml index 7224f9db..1849d32e 100644 --- a/app/views/notifications/_notification_tabs.html.haml +++ b/app/views/notifications/_notification_tabs.html.haml @@ -1,8 +1,8 @@ .col-md-3.col-xs-12.col-sm-3 .panel.panel-default.hidden-xs .list-group - = list_group_item "All notifications", notifications_path, badge: Notification.where(new: true).count - = list_group_item "Answers", notifications_path('answer'), badge: Notification.where(target_type: "Answer", new: true).count - = list_group_item "Smiles", notifications_path('smile'), badge: Notification.where(target_type: "Smile", new: true).count - = list_group_item "Comments", notifications_path('comment'), badge: Notification.where(target_type: "Comment", new: true).count - = list_group_item "Followers", notifications_path('relationship'), badge: Notification.where(target_type: "Relationship", new: true).count \ No newline at end of file + = list_group_item "All notifications", notifications_path, badge: Notification.for(current_user).where(new: true).count + = list_group_item "Answers", notifications_path('answer'), badge: Notification.for(current_user).where(target_type: "Answer", new: true).count + = list_group_item "Smiles", notifications_path('smile'), badge: Notification.for(current_user).where(target_type: "Smile", new: true).count + = list_group_item "Comments", notifications_path('comment'), badge: Notification.for(current_user).where(target_type: "Comment", new: true).count + = list_group_item "Followers", notifications_path('relationship'), badge: Notification.for(current_user).where(target_type: "Relationship", new: true).count