mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-12 21:00:58 +00:00
Allow higher amount of points for matches... ask Mega why this is needed
This commit is contained in:
parent
3e42e2d205
commit
8a29678907
2 changed files with 3 additions and 3 deletions
|
@ -118,7 +118,7 @@ class Match < ActiveRecord::Base
|
|||
order: "month_n"
|
||||
|
||||
validates :contester1, :contester2, :contest, presence: true
|
||||
validates :score1, :score2, format: /\A[0-9]\z/, allow_nil: true
|
||||
validates :score1, :score2, format: /\A[1-9]?[0-9]\z/, allow_nil: true
|
||||
validates :report, length: { maximum: 64_000 }, allow_blank: true
|
||||
|
||||
before_create :set_hltv
|
||||
|
|
|
@ -18,8 +18,8 @@ class Prediction < ActiveRecord::Base
|
|||
attr_protected :id, :created_at, :updated_at, :result
|
||||
|
||||
validates_presence_of :match, :user
|
||||
validates_inclusion_of :score1, :in => 0..4, :message => "Invalid score"
|
||||
validates_inclusion_of :score2, :in => 0..4, :message => "Invalid score"
|
||||
validates_inclusion_of :score1, :in => 0..99, :message => "Invalid score"
|
||||
validates_inclusion_of :score2, :in => 0..99, :message => "Invalid score"
|
||||
validates_uniqueness_of :match_id, :scope => :user_id
|
||||
|
||||
scope :with_contest, :include => {:match => :contest}
|
||||
|
|
Loading…
Reference in a new issue