Add contestants
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2025-03-20 09:19:39 +01:00
parent 658c50fd04
commit 44507bb85c
18 changed files with 145 additions and 25 deletions

View File

@@ -1,4 +1,5 @@
class Contest < ApplicationRecord
belongs_to :user
has_many :contestants, dependent: :destroy
has_many :puzzles, dependent: :destroy
end

4
app/models/contestant.rb Normal file
View File

@@ -0,0 +1,4 @@
class Contestant < ApplicationRecord
belongs_to :contest
validates :name, presence: true
end