diff app/views/pastes/index.html.erb @ 2:42de15334db1

Added the pastes.
author Edho Arief <edho@myconan.net>
date Sun, 26 Aug 2012 11:28:23 -0700
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/views/pastes/index.html.erb	Sun Aug 26 11:28:23 2012 -0700
@@ -0,0 +1,23 @@
+<h1>Listing pastes</h1>
+
+<table>
+  <tr>
+    <th>Id</th>
+    <th>Paste</th>
+    <th></th>
+    <th></th>
+  </tr>
+
+<% @pastes.each do |paste| %>
+  <tr>
+    <td><%= link_to paste.id, paste %></td>
+    <td><%= paste.paste %></td>
+    <td><%= link_to 'Edit', edit_paste_path(paste) %></td>
+    <td><%= link_to 'Destroy', paste, :method => :delete, :data => { :confirm => 'Are you sure?' } %></td>
+  </tr>
+<% end %>
+</table>
+
+<br />
+
+<%= link_to 'New Paste', new_paste_path %>