Public scoreboard scaffold
Some checks failed
CI / scan_ruby (push) Successful in 14s
CI / scan_js (push) Successful in 12s
CI / lint (push) Successful in 11s
CI / test (push) Failing after 8s

This commit is contained in:
sto
2025-03-23 08:44:38 +01:00
parent 9a2a3a6f33
commit 2982f44acc
7 changed files with 45 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