Create a gist now

Instantly share code, notes, and snippets.

Fragment caching applied
<table>
<% cache do %>
<% @posts.each do |post| %>
<tr>
<td><strong><%= post.title %></strong></td>
</tr>
<tr>
<td><em>Posted: <%= post.created_at.strftime('%a %d %B %Y - %H:%M') %></em></td>
</tr>
<tr>
<td><%= post.content %>... [ <%= link_to 'Read Post', post %> ]</td>
</tr>
<% end %>
<% end %>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment