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
10 lines
213 B
Ruby
10 lines
213 B
Ruby
module Bubble::Commentable
|
|
extend ActiveSupport::Concern
|
|
|
|
included do
|
|
has_many :comments
|
|
|
|
scope :ordered_by_comments, -> { left_joins(:comments).group(:id).order("COUNT(comments.id) DESC") }
|
|
end
|
|
end
|