dev_bj
daiao 5 years ago
parent f0ff7c8b67
commit 17da33dcba

@ -20,7 +20,7 @@ class Challenge < ActiveRecord::Base
# validates_presence_of :score # validates_presence_of :score
validates_presence_of :task_pass validates_presence_of :task_pass
validates_length_of :subject, :maximum => 255 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 :choose_type, lambda{where(st: 1)}
scope :practice_type, lambda{where(st: 0)} scope :practice_type, lambda{where(st: 0)}

Loading…
Cancel
Save