view app/views/pastes/index.html.erb @ 13:33e8202c7e5d

Added example database.yml.
author Edho Arief <edho@myconan.net>
date Sun, 26 Aug 2012 12:06:48 -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 %>