<h1><%= @topic.name %></h1>

<% if policy( @topic ).update? %>
  <%= link_to "Edit Topic", edit_topic_path, class: 'btn btn-primary btn-mini' %>
<% end %>

<div class="row">
  <div class="span8">
    <p class="lead"><%= @topic.description %></p>
    <%= render @posts %>
    <%= will_paginate @posts %>
  </div>
  <div class="span4">
    <% if policy( current_user.posts.build ).create? %>
      <%= link_to "New Post", new_topic_post_path(@topic), class: 'btn btn-large btn-block' %>
    <% end %>
    <% if policy( @topic ).destroy? %>
      <%= link_to "Delete Topic", @topic, method: :delete, class: 'btn btn-large btn-block btn-danger', confirm: 'Are you sure you want to delete this topic?' %>
    <% end %>
  </div>
</div>

<h1><%= @topic.name %></h1>

<% if policy( @topic ).update? %>
  <%= link_to "Edit Topic", edit_topic_path, class: 'btn btn-primary btn-mini' %>
<% end %>

<div class="row">
  <div class="span8">
    <p class="lead"><%= @topic.description %></p>
    <%= render @posts %>
    <%= will_paginate @posts %>
  </div>
  <div class="span4">
    <% if policy( Post.new ).create? %>
      <%= link_to "New Post", new_topic_post_path(@topic), class: 'btn btn-large btn-block' %>
    <% end %>
    <% if policy( @topic ).destroy? %>
      <%= link_to "Delete Topic", @topic, method: :delete, class: 'btn btn-large btn-block btn-danger', confirm: 'Are you sure you want to delete this topic?' %>
    <% end %>
  </div>
</div>

Fix topics/show for guest users
Fix topics/show for guest users
