view app/views/pastes/index.html.erb @ 3:04a43fae272c

Better styled paste show.
author Edho Arief <edho@myconan.net>
date Sun, 26 Aug 2012 11:29:31 -0700
parents 42de15334db1
children
line wrap: on
line source

<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 %>