0
我enrollment.rb
计数父梁2
attr_accessible :semester_id
has_many :studentpayments
has_many :student_deductions
我studentpayment.rb
belongs_to :enrollment
我student_deduction.rb
belongs_to :enrollment
我如何获得的唯一的登记基础上,semester_id
如果enrollment
有studentpayment
或有student_deduction
?