Browse Source

feat: unrelated nil safe notifications tweak

pull/2197/head
natdeanlewissoftwire 2 years ago
parent
commit
19832ea62d
  1. 2
      app/controllers/notifications_controller.rb

2
app/controllers/notifications_controller.rb

@ -3,7 +3,7 @@ class NotificationsController < ApplicationController
if current_user.blank? if current_user.blank?
redirect_to root_path redirect_to root_path
else 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) redirect_back(fallback_location: root_path)
end end
end end

Loading…
Cancel
Save