更新时间:2023-12-03 09:07:34
好.我想,我可以通过年级来获得学生的名字,而不是通过学生来获得年级的名字,所以我做到了
Ok. I figured that instead of getting the name of the Grade throught Students, i can get the student through grades, so I did
<% aula.grades.each do |grade| %>
<%= link_to grade.student.name, student %>-<%= grade.name %>
<% end %>
现在它好起来了.