From f2c2b0492ea0235c3e36f799bf6c991375e3923b Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 12 Apr 2025 11:42:50 +0200 Subject: [PATCH] Have to solve this in an overhaul of events --- app/models/comment.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/models/comment.rb b/app/models/comment.rb index cba429284..d6f29ae33 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -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