From 175ad4a83b6453e39aeddd2fac6bc111efa32abf Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 18 Dec 2022 02:23:55 +0100 Subject: [PATCH] eager load notification associations for dropdown --- app/views/navigation/_main.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/navigation/_main.html.haml b/app/views/navigation/_main.html.haml index 5238c0f7..46a6a0e1 100644 --- a/app/views/navigation/_main.html.haml +++ b/app/views/navigation/_main.html.haml @@ -1,4 +1,4 @@ -- notifications = Notification.for(current_user).where(new: true).limit(4) +- notifications = Notification.for(current_user).where(new: true).includes([:target]).limit(4) = render 'navigation/desktop', notifications: notifications = render 'navigation/mobile', notifications: notifications