<h1>Listing students</h1>

<table border="1">
  <tr>
	<th>ID</th>
    <th>Name</th>
    <th>User</th>
    <th>Email</th>
    <th>Groupnum</th>
  </tr>

<% @students.each do |student| %>
  <tr>
	<td><%=h student.id %></td>
    <td><%=h student.name %></td>
    <td><%=h student.user %></td>
    <td><%=h student.email %></td>
    <td><%=h student.groupnum %></td>
    <td><%= link_to 'Show', student %></td>
    <td><%= link_to 'Edit', edit_student_path(student) %></td>
    <td><%= link_to 'Destroy', student, 
        :confirm => 'Are you sure?', :method => :delete %></td>
    <td><%= link_to 'Summary',  :controller => "studentassignments", :action => "summary",  :id => student  %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New student', new_student_path %>