|
|
@ -28,7 +28,7 @@ class Challenge < ApplicationRecord
|
|
|
|
|
|
|
|
|
|
|
|
scope :fields_for_list, -> { select([:id, :subject, :st, :score, :position, :shixun_id]) }
|
|
|
|
scope :fields_for_list, -> { select([:id, :subject, :st, :score, :position, :shixun_id]) }
|
|
|
|
|
|
|
|
|
|
|
|
validates :task_pass, length: { maximum: 10000, too_long: "不能超过10000个字符" }
|
|
|
|
validates :task_pass, length: { maximum: 35000, too_long: "不能超过35000个字符" }
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
after_commit :create_diff_record
|
|
|
|
after_commit :create_diff_record
|
|
|
|