Displaying 1 result from an estimated 1 matches for "studentsschool".
Did you mean:
students_school
2008 Apr 11
2
Validating an ActiveRecord object and its has_many :through associations
...onflicts) would be
done twice, once from eca''s and again from classes. i would like to
handle this through a validates_associated so that the Student is
validated whenever an association is changed or added. However, I
can''t see how this would work.
To illustrate:
>>ss = StudentsSchool.new(:school_id => 1, :student_id => 10)
=> #<StudentsSchooll>...
>>ss.student
=> #<Student>...
>>ss.student.students_school
=> []
So the ss is still a temporary object that won''t be seen in the
Student validation.
Can anyone share some ideas?
--~--~...