30 lines
607 B
Plaintext
30 lines
607 B
Plaintext
<p id="notice"><%= notice %></p>
|
|
|
|
<h1>Listing Jokes</h1>
|
|
|
|
<table>
|
|
<thead>
|
|
<tr>
|
|
<th>Joke</th>
|
|
<th>Punchline</th>
|
|
<th colspan="3"></th>
|
|
</tr>
|
|
</thead>
|
|
|
|
<tbody>
|
|
<% @jokes.each do |joke| %>
|
|
<tr>
|
|
<td><%= joke.joke %></td>
|
|
<td><%= joke.punchline %></td>
|
|
<td><%= link_to 'Show', joke %></td>
|
|
<td><%= link_to 'Edit', edit_joke_path(joke) %></td>
|
|
<td><%= link_to 'Destroy', joke, method: :delete, data: { confirm: 'Are you sure?' } %></td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<br>
|
|
|
|
<%= link_to 'New Joke', new_joke_path %>
|