eager load notification associations for dropdown

This commit is contained in:
Andreas Nedbal 2022-12-18 02:23:55 +01:00 committed by Andreas Nedbal
parent 19e5837ce5
commit 175ad4a83b
1 changed files with 1 additions and 1 deletions

View File

@ -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/desktop', notifications: notifications
= render 'navigation/mobile', notifications: notifications = render 'navigation/mobile', notifications: notifications