diff --git a/app/models/puzzle.rb b/app/models/puzzle.rb index 216b7ca..5734d14 100644 --- a/app/models/puzzle.rb +++ b/app/models/puzzle.rb @@ -21,7 +21,7 @@ class Puzzle < ApplicationRecord belongs_to :contest - has_many :completions + has_many :completions, dependent: :destroy has_one_attached :image validates :name, presence: true