ae497aae85
Buckets destroy their bubbles, which destroy their thread entries, which destroy their threadables, which is how comments end up destroyed, and then rollups end up deleting their events
8 lines
211 B
Ruby
8 lines
211 B
Ruby
class ThreadEntry < ApplicationRecord
|
|
belongs_to :bubble
|
|
|
|
delegated_type :threadable, types: %w[ Comment Rollup ], dependent: :destroy
|
|
|
|
scope :chronologically, -> { order created_at: :asc, id: :desc }
|
|
end
|