Merge pull request #1198 from Retrospring/fix/notification-fragment-cache
Fix incorrect caching method used for notifications dropdown
This commit is contained in:
commit
ff7c5bb967
|
@ -31,7 +31,7 @@
|
||||||
%span.badge= notification_count
|
%span.badge= notification_count
|
||||||
.dropdown-menu.dropdown-menu-end.notification-dropdown
|
.dropdown-menu.dropdown-menu-end.notification-dropdown
|
||||||
%turbo-frame#notifications-dropdown-list
|
%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)
|
- notifications = Notification.for(current_user).where(new: true).includes([:target]).limit(4)
|
||||||
= render "navigation/dropdown/notifications", notifications:, size: "desktop"
|
= 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') }
|
%li.nav-item.d-none.d-sm-block{ data: { bs_toggle: 'tooltip', bs_placement: 'bottom' }, title: t('.ask_question') }
|
||||||
|
|
Loading…
Reference in New Issue