Public scoreboard scaffold
Some checks failed
CI / scan_ruby (push) Successful in 1m28s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 12s
CI / test (push) Failing after 18s

This commit is contained in:
sto
2025-03-22 18:52:20 +01:00
parent 9a2a3a6f33
commit e8c3f04577
7 changed files with 44 additions and 2 deletions

View File

@@ -27,5 +27,5 @@ class Contest < ApplicationRecord
has_many :puzzles, dependent: :destroy
validates :name, presence: true
validates :slug, presence: true, format: { with: /\A(\w|-)*\z/, message: 'Only alphanumeric characters, "-" and "_" allowed.' }
validates :slug, presence: true, uniqueness: true, format: { with: /\A(\w|-)*\z/, message: 'Only alphanumeric characters, "-" and "_" allowed.' }
end