mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-18 23:56:03 +01:00
Merge pull request #1203 from Retrospring/fix/notification-bugs
Notification dropdown fixes
This commit is contained in:
commit
333af458db
2 changed files with 3 additions and 0 deletions
|
@ -27,6 +27,7 @@ class NotificationsController < ApplicationController
|
|||
|
||||
def read
|
||||
current_user.notifications.where(new: true).update_all(new: false) # rubocop:disable Rails/SkipsModelValidations
|
||||
current_user.touch(:notifications_updated_at)
|
||||
|
||||
respond_to do |format|
|
||||
format.turbo_stream do
|
||||
|
|
2
app/views/notifications/type/_nilclass.html.haml
Normal file
2
app/views/notifications/type/_nilclass.html.haml
Normal file
|
@ -0,0 +1,2 @@
|
|||
-# This is a stub to prevent errors on broken notifications on content being asynchronously destroyed.
|
||||
- logger.error "Notification ##{notification.id} has a target which doesn't exist. (Target: #{notification.target_type}##{notification.target_id})"
|
Loading…
Reference in a new issue