You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/models/exercise_answer_comment.rb

10 lines
317 B

class ExerciseAnswerComment < ApplicationRecord
# belongs_to :exercise_answer
belongs_to :user
belongs_to :exercise_question
belongs_to :exercise_shixun_answer, optional: true
belongs_to :exercise_answer,optional: true
scope :search_answer_comments, lambda {|name,ids| where("#{name}":ids)}
end