Skip to content
Permalink
6bb982f099
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (26 sloc) 732 Bytes
<p id="notice"><%= notice %></p>
<h1>Courses</h1>
<table>
<thead>
<tr>
<th>Course name</th>
<th>Course number</th>
<th>Students</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @courses.each do |course| %>
<tr>
<td><%= course.course_name %></td>
<td><%= course.course_number %></td>
<td><%= course.users.map {|k| k.name}.join(', ') %></td>
<td><%= link_to 'Show', course %></td>
<td><%= link_to 'Edit', edit_course_path(course) %></td>
<td><%= link_to 'Destroy', course, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Course', new_course_path %>