You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
40 lines
964 B
40 lines
964 B
<p id="notice"><%= notice %></p>
|
|
|
|
<h1>Questions</h1>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Text</th>
|
|
<th>Option1</th>
|
|
<th>Option2</th>
|
|
<th>Option3</th>
|
|
<th>Option4</th>
|
|
<th>Option5</th>
|
|
<th>Category</th>
|
|
<th colspan="3"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @questions.each do |question| %>
|
|
<tr>
|
|
<td><%= question.text %></td>
|
|
<td><%= question.option1 %></td>
|
|
<td><%= question.option2 %></td>
|
|
<td><%= question.option3 %></td>
|
|
<td><%= question.option4 %></td>
|
|
<td><%= question.option5 %></td>
|
|
<td><%= question.category_id %></td>
|
|
<td><%= link_to 'Show', question %></td>
|
|
<td><%= link_to 'Edit', edit_question_path(question) %></td>
|
|
<td><%= link_to 'Destroy', question, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<%= link_to 'New Question', new_question_path %>
|