From a17b169679f85a34b7ecb4772c335f4df34d8ec6 Mon Sep 17 00:00:00 2001 From: Roscoe Date: Wed, 10 Sep 2025 04:18:47 +0100 Subject: [PATCH] Deleting clips will now correctly remove any dangling relations --- app/models/clip.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/clip.rb b/app/models/clip.rb index 1588fe7..52ee74a 100644 --- a/app/models/clip.rb +++ b/app/models/clip.rb @@ -1,7 +1,7 @@ class Clip < ApplicationRecord has_one_attached :video belongs_to :category - has_many :tag_to_clips + has_many :tag_to_clips, dependent: :destroy has_many :tags, through: :tag_to_clips validates :title, presence: true end