skill-assessment-app/app/views/admin/quiz/_table_list.html.erb

20 lines
500 B
Plaintext
Raw Normal View History

2016-08-18 18:22:57 -05:00
<table cellspacing="0" cellpadding="0">
<tr>
<th>Name</th>
<th>Dept</th>
<th>Unit</th>
<th>Questions</th>
<th></th>
</tr>
<% quizzes.each do |quiz| %>
<tr>
<td><%= link_to quiz.name, admin_quiz_path(quiz.to_i) %></td>
<td><%= quiz.dept %></td>
<td><%= quiz.unit %></td>
<td><%= quiz.questions.count %></td>
2017-03-20 10:57:50 -05:00
<td><%= link_to 'edit', admin_edit_quiz_path(quiz.to_i), { class: "" } if policy(quiz).edit? %></td>
2016-08-18 18:22:57 -05:00
</tr>
<% end %>
</table>