From 19832ea62db53062713a4606cf112c52e152626e Mon Sep 17 00:00:00 2001 From: natdeanlewissoftwire Date: Wed, 31 Jan 2024 13:36:56 +0000 Subject: [PATCH] feat: unrelated nil safe notifications tweak --- app/controllers/notifications_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 517199e93..e3aff82e6 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -3,7 +3,7 @@ class NotificationsController < ApplicationController if current_user.blank? redirect_to root_path else - current_user.newest_active_unread_notification.mark_as_read! for: current_user + current_user.newest_active_unread_notification.mark_as_read! for: current_user if current_user.newest_active_unread_notification.present? redirect_back(fallback_location: root_path) end end