diff --git a/app/models/notification.rb b/app/models/notification.rb index 70b02de2b..2d868674c 100644 --- a/app/models/notification.rb +++ b/app/models/notification.rb @@ -10,7 +10,13 @@ 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, id: :desc) } - scope :preloaded, -> { preload(:card, :creator, :account, source: [ :board, :creator, { eventable: [ :closure, :board, :assignments ] } ]) } + scope :preloaded, -> { + preload( + :creator, :account, + card: [ :board, :column, :closure, :not_now ], + source: [ :board, :creator, { eventable: [ :closure, :board, :assignments ] } ] + ) + } before_validation :set_card after_create :bundle