Reactions dont have any callbacks so can just be deleted

This commit is contained in:
David Heinemeier Hansson
2025-04-12 10:15:38 +02:00
parent 6f3ac772ea
commit 80bc1dd163
+1 -1
View File
@@ -2,7 +2,7 @@ class Comment < ApplicationRecord
include Messageable, Notifiable, Searchable
belongs_to :creator, class_name: "User", default: -> { Current.user }
has_many :reactions, dependent: :destroy
has_many :reactions, dependent: :delete_all
searchable_by :body_plain_text, using: :comments_search_index, as: :body