Skip to content

Instantly share code, notes, and snippets.

@christianrojas
Created March 18, 2010 05:08
Show Gist options
  • Save christianrojas/336064 to your computer and use it in GitHub Desktop.
Save christianrojas/336064 to your computer and use it in GitHub Desktop.
<h1>Listing posts</h1>
<table>
<tr>
<th>Name</th>
<th>Title</th>
<th>Content</th>
</tr>
<% for post in @posts %>
<tr>
<td><%=h post.name %></td>
<td><%=h post.title %></td>
<td><%=h post.content %></td>
<td><%= link_to 'Show', post %></td>
<td><%= link_to 'Edit', edit_post_path(post) %></td>
<td><%= link_to 'Destroy', post, :confirm => 'Are you sure?',
:method => :delete %></td>
</tr>
<% end %>
</table>
<br />
<%= link_to 'New post', new_post_path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment