search for: students_assignment

Displaying 1 result from an estimated 1 matches for "students_assignment".

2008 Apr 11
2
Validating an ActiveRecord object and its has_many :through associations
Considering an object with several has_many :through => associations, what is the ''best'' way to handle validations? As an example: class Student < ActiveRecord::Base # some attrbutes like # :name # :grade # relationships has_many :students_assignment, :dependent => :destroy has_many :assignments, :through => :students_assignment has_many :students_class, :dependent => :destroy has_many :classes, :through => :students_class has_many :students_extracurricular_activity, :dependent => :destroy has_many :extracurricular_ac...