% @page_title = 'Blog' %>
<% content_for :head do %>
<%= spud_blog_rss_link %>
<% end %>
<% cache(cache_key_for_spud_collection(@posts, :cache_params => [:category_url_name, :archive_date, :page], :for_user => true)) do %>
<% if @posts.length > 0 %>
<% @posts.includes(:categories, :author).each do |post| %>
<% cache(post) do %>
<%= link_to post.title, blog_post_path(post.url_name) %>
Posted by <%= post.author.full_name %> on <%= post.display_date %>
<%= truncate_html post.content_processed.html_safe, :length => 250 %>
<% end %>
<% end %>
<% else %>
No posts were found in this category
<% end %>
<% end %>
<%= will_paginate @posts %>