mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Add problem type
This commit is contained in:
27
app/views/problems/index.html.erb
Normal file
27
app/views/problems/index.html.erb
Normal file
@@ -0,0 +1,27 @@
|
||||
<h1>Listing problems</h1>
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Title</th>
|
||||
<th>Content</th>
|
||||
<th colspan="3"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @problems.each do |problem| %>
|
||||
<tr>
|
||||
<td><%= problem.title %></td>
|
||||
<td><%= problem.content %></td>
|
||||
<td><%= link_to 'Show', problem %></td>
|
||||
<td><%= link_to 'Edit', edit_problem_path(problem) %></td>
|
||||
<td><%= link_to 'Destroy', problem, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<br>
|
||||
|
||||
<%= link_to 'New Problem', new_problem_path %>
|
||||
Reference in New Issue
Block a user