这是我的两个模特
class Answer
include Mongoid::Document
belongs_to :question
has_many :responses
has_many :validations, :dependent => :delete
end
和
class Question
include Mongoid::Document
has_many :answers, :dependent => :delete # it might not always have answers
belongs_to :correct_answer, :class_name => "Answer", :dependent => :delete
end
这里缺少什么?无法解决它