Created
September 11, 2012 21:42
-
-
Save andyhawthorne/3702298 to your computer and use it in GitHub Desktop.
Fragment caching applied
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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