diff --git a/app/models/notification.rb b/app/models/notification.rb index 3d7df5885..70b02de2b 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -9,7 +9,7 @@ class Notification < ApplicationRecord scope :unread, -> { where(read_at: nil) } scope :read, -> { where.not(read_at: nil) } - scope :ordered, -> { order(read_at: :desc, updated_at: :desc) } + scope :ordered, -> { order(read_at: :desc, updated_at: :desc, id: :desc) } scope :preloaded, -> { preload(:card, :creator, :account, source: [ :board, :creator, { eventable: [ :closure, :board, :assignments ] } ]) } before_validation :set_card