delete reaction notifications when deleting status

This commit is contained in:
fef 2022-12-07 12:47:03 +00:00 committed by Jeremy Kescher
parent f87de8770b
commit 6fa408f1a0
No known key found for this signature in database
GPG key ID: 80A419A7A613DFA4

View file

@ -16,6 +16,8 @@ class StatusReaction < ApplicationRecord
belongs_to :status, inverse_of: :status_reactions
belongs_to :custom_emoji, optional: true
has_one :notification, as: :activity, dependent: :destroy
validates :name, presence: true
validates_with StatusReactionValidator