UM-USElab / GradeCraft

GradeCraft is a gamified gradebook, intended to help motivate students to be more engaged in their own learning.
GNU Affero General Public License v3.0
9 stars 6 forks source link

Added polymorphic mappings, removed user_id from grades table #97

Closed chcholman closed 12 years ago

chcholman commented 12 years ago

If you create an assignment, and then add a grade, you need to be able to see the user/group/team name that has earned that grade on the assignment show page. How do you write that relationship?

allspiritseve commented 12 years ago

Would this work?

- @assignment.grades.each do |grade|
  = link_to grade.gradeable.name, grade.gradeable