Have to solve this in an overhaul of events

This commit is contained in:
David Heinemeier Hansson
2025-04-12 11:42:50 +02:00
parent f5b30456a0
commit f2c2b0492e
+1
View File
@@ -23,6 +23,7 @@ class Comment < ApplicationRecord
end
private
# FIXME: This isn't right. We need to introduce an eventable polymorphic association for this.
def cleanup_events
# Delete events that reference directly in particulars
Event.where(particulars: { comment_id: id }).destroy_all