当我在 rails 控制台中输入“Student.find(1).togethers”时,我得到了这个数组:
=> [#<Together id: 1, student_id: 1, teacher_id: 1, summary: "good", created_at: "2012-12-12 01:56:05", updated_at: "2012-12-12 01:56:05">]
现在我如何使用“teacher_id:1”访问老师????
我想做类似的事情:
Student.find(1).teacher