Deleting clips will now correctly remove any dangling relations
This commit is contained in:
parent
86b296dddf
commit
a17b169679
1 changed files with 1 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
class Clip < ApplicationRecord
|
class Clip < ApplicationRecord
|
||||||
has_one_attached :video
|
has_one_attached :video
|
||||||
belongs_to :category
|
belongs_to :category
|
||||||
has_many :tag_to_clips
|
has_many :tag_to_clips, dependent: :destroy
|
||||||
has_many :tags, through: :tag_to_clips
|
has_many :tags, through: :tag_to_clips
|
||||||
validates :title, presence: true
|
validates :title, presence: true
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue