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
?