Comments should always have messages

This commit is contained in:
David Heinemeier Hansson
2025-04-12 11:23:45 +02:00
parent b8c3ac8145
commit 81a89dbda1
+1 -1
View File
@@ -25,7 +25,7 @@ class Comment < ApplicationRecord
private
def cleanup_events
# Delete events that reference through event_summary
if message&.event_summary.present?
if message.event_summary.present?
Event.where(summary: message.event_summary).destroy_all
end