提交文件'

dev_forum
daiao 5 years ago
commit 7ad97372dd

@ -5,11 +5,11 @@ class ExerciseQuestion < ApplicationRecord
belongs_to :shixun, optional: true
has_many :exercise_choices, :dependent => :destroy
has_many :exercise_answers, :dependent => :destroy
has_many :exercise_answers
has_many :exercise_shixun_challenges,:dependent => :destroy
has_many :exercise_shixun_answers, :dependent => :destroy
has_many :exercise_answer_comments, :dependent => :destroy
has_many :exercise_standard_answers, :dependent => :destroy
has_many :exercise_shixun_answers
has_many :exercise_answer_comments
has_many :exercise_standard_answers
scope :insert_question_ex, lambda {|k| where("question_number > ?",k)}
scope :find_by_custom, lambda {|k,v| where("#{k} = ?",v)} #根据传入的参数查找问题

Loading…
Cancel
Save