Public scoreboard scaffold

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