Validate match has only 2 scores
This commit is contained in:
parent
1cd4835651
commit
552566dd2e
|
|
@ -4,4 +4,6 @@ class Match < ApplicationRecord
|
|||
belongs_to :stage
|
||||
belongs_to :group
|
||||
has_many :scores, dependent: :destroy
|
||||
|
||||
validates :scores, length: { maximum: 2 }
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue