|
|
|
@ -20,7 +20,7 @@ class Challenge < ActiveRecord::Base
|
|
|
|
|
# validates_presence_of :score
|
|
|
|
|
validates_presence_of :task_pass
|
|
|
|
|
validates_length_of :subject, :maximum => 255
|
|
|
|
|
scope :min, lambda { select([:id, :subject, :position, :shixun_id, :st, :score, :path, :task_pass, :modify_time, :web_route, :answer]) }
|
|
|
|
|
scope :min, lambda { select([:id, :subject, :position, :shixun_id, :st, :score, :exec_time, :path, :task_pass, :modify_time, :web_route, :answer]) }
|
|
|
|
|
scope :choose_type, lambda{where(st: 1)}
|
|
|
|
|
scope :practice_type, lambda{where(st: 0)}
|
|
|
|
|
|
|
|
|
|