|
|
|
@ -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 |
|
|
|
|