<h1>Listing Group Assignment Grades</h1>

<table border="1">
  <tr>
    <th>Group number</th>
    <th>Assignment ID</th>
    <th>Assignment Description</th>
    <th>Grade</th>
  </tr>

<% @ggrades.each do |ggrade| %>
  <tr>
    <td><%=h ggrade.groupnum %></td>
    <td><%=h ggrade.assignment_id %></td>
    <td><%=h Assignment.find(:all, :select => "assignments.description", 
        :conditions => "id = #{ggrade.assignment_id} " ).collect{|s| s.description} %></td>
    <td><%=h ggrade.grade %></td>
    <td><%= link_to 'Show', ggrade %></td>
    <td><%= link_to 'Edit', edit_ggrade_path(ggrade) %></td>
    <td><%= link_to 'Destroy', ggrade, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New group-assignment grade', new_ggrade_path %>