From 15405e41c52defff3224a5e41030dc06c8b39945 Mon Sep 17 00:00:00 2001 From: Karina Kwiatek Date: Sun, 7 May 2023 16:54:35 +0200 Subject: [PATCH] Fix incorrect caching method used for notifications dropdown --- app/views/navigation/_desktop.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/navigation/_desktop.html.haml b/app/views/navigation/_desktop.html.haml index 35ee9a4f..05e9a6a3 100644 --- a/app/views/navigation/_desktop.html.haml +++ b/app/views/navigation/_desktop.html.haml @@ -31,7 +31,7 @@ %span.badge= notification_count .dropdown-menu.dropdown-menu-end.notification-dropdown %turbo-frame#notifications-dropdown-list - - Rails.cache.fetch current_user.notification_dropdown_cache_key do + - cache current_user.notification_dropdown_cache_key do - notifications = Notification.for(current_user).where(new: true).includes([:target]).limit(4) = render "navigation/dropdown/notifications", notifications:, size: "desktop" %li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t('.ask_question') }