Sha256: 011697f9e66618f8c4290279f487d898c1a38e7bc59e5ef0a9c6fd2a7181da30

Contents?: true

Size: 1.5 KB

Versions: 5

Compression:

Stored size: 1.5 KB

Contents

<% @page_title = @post.title %>

<% content_for :head do %>
  <% cache([@post, 'head']) do %>
    <%= spud_blog_rss_link %>
    <meta name="description" content="<%= @post.meta_description %>" />
    <% if @post.meta_keywords.blank? %>
      <meta name="keywords" content="<%= @post.categories.collect{ |c| c.name }.join(',') %>" />
    <% else %>
      <meta name="keywords" content="<%= @post.meta_keywords %>" />
    <% end %>
  <% end %>
<% end %>

<% cache(@post) do %>
  <div class="spud_blog_post">
    <h3><%= @post.title %></h3>
    <h4>Posted by <%= @post.author.full_name %> on <%= @post.display_date %></h4>
    <% if @post.categories.any? %>
    <p id="spud_blog_post_categories">
      Filed under
      <%= raw(@post.categories.collect{ |c| link_to c.name, post_category_path(c.url_name) }.join(', ')) %>
    </p>
    <% end %>
    <div id="spud_blog_post_content">
      <%= raw @post.content_processed %>
    </div>
  </div>

  <% if @post.comments_enabled %>
    <div class="spud_blog_post_comment">
      <h5>Post a Comment:</h5>
      <%= render 'comment_form' %>
    </div>
    <% cache(cache_key_for_spud_collection(@post.visible_comments, key:'comments')) do %>
      <ul id="spud_blog_post_comments">
        <% @post.visible_comments.each do |comment| %>
          <% cache(comment) do %>
            <li>
              <h6>Posted by: <%= comment.author %></h6>
              <p><%= comment.content %></p>
            </li>
          <% end %>
        <% end %>
      </ul>
    <% end %>
  <% end %>
<% end %>

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tb_blog-1.3.1 app/views/posts/show.html.erb
tb_blog-1.3.0 app/views/posts/show.html.erb
tb_blog-1.3.0.beta1 app/views/posts/show.html.erb
tb_blog-1.2.1 app/views/posts/show.html.erb
tb_blog-1.2.0 app/views/posts/show.html.erb