Dont overload the main transaction

Even if we are going to get rid of this cleanup_events stuff.
This commit is contained in:
David Heinemeier Hansson
2025-04-12 13:33:06 +02:00
parent 2357c75063
commit d4a31fec6d
+1 -1
View File
@@ -11,7 +11,7 @@ class Comment < ApplicationRecord
scope :belonging_to_card, ->(card) { joins(:message).where(messages: { card_id: card.id }) }
after_create_commit :watch_card_by_creator, :track_commenting_on_card
before_destroy :cleanup_events
after_destroy_commit :cleanup_events
def to_partial_path
"cards/#{super}"