Skip to content
Permalink
6bb982f099
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 %>
You can’t perform that action at this time.