我已经给出了这段代码
public function validation()
{
$this->validate(new MaxMinValidator(
array(
"field" => "Email",
"min" => 10,
"max" => 100
)
));
// This line:
return $this->validationHasFailed() != true;
}
获取@students。请指导我如何干这个查询。提前谢谢。
答案 0 :(得分:0)
最好的方法:
Student
.joins(student_classes: [:class])
.where(classes: {employee_id: current_employee.id})