mirror of
https://github.com/projekteuler/projekteuler.git
synced 2026-01-27 02:28:50 +01:00
Add controller for Problems with index and show actions
This commit is contained in:
22
app/views/problems/index.html.erb
Normal file
22
app/views/problems/index.html.erb
Normal file
@@ -0,0 +1,22 @@
|
||||
<h1>Listing Problems</h1>
|
||||
|
||||
<%= render 'problem_pagination' %>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Title</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<% @problems.each do |problem| %>
|
||||
<tr>
|
||||
<td><%= problem.id %></td>
|
||||
<td><%= link_to problem.title, problem %></td>
|
||||
</tr>
|
||||
<% end %>
|
||||
</tbody>
|
||||
</table>
|
||||
<%= render 'problem_pagination' %>
|
||||
<br>
|
||||
Reference in New Issue
Block a user