blob: 601ba13cd14802ef3e4a75156880ca64b523a825 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
<p id="notice"><%= notice %></p>
<h1>Snippets</h1>
<table>
<thead>
<tr>
<th>Title</th>
<th>Code</th>
<th colspan="3"></th>
</tr>
</thead>
<tbody>
<% @snippets.each do |snippet| %>
<tr>
<td><%= snippet.title %></td>
<td><%= snippet.code %></td>
<td><%= link_to 'Show', snippet %></td>
<td><%= link_to 'Edit', edit_snippet_path(snippet) %></td>
<td><%= link_to 'Destroy', snippet, method: :delete, data: { confirm: 'Are you sure?' } %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<%= link_to 'New Snippet', new_snippet_path %>
|