From 95b555869bf2d7d3d0079da4cde72975abf06cc3 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Fri, 21 Nov 2025 16:31:06 +0100 Subject: [PATCH] not used --- app/models/notification.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/app/models/notification.rb b/app/models/notification.rb index 5cd3802a4..4b69dd6e6 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -9,7 +9,6 @@ class Notification < ApplicationRecord scope :unread, -> { where(read_at: nil) } scope :read, -> { where.not(read_at: nil) } scope :ordered, -> { order(read_at: :desc, created_at: :desc) } - scope :with_unread_first, -> { order(Arel.sql("CASE WHEN read_at IS NULL THEN 0 ELSE 1 END")) } after_create_commit :broadcast_unread after_destroy_commit :broadcast_read