Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<div class="row">
<div class="span8">
<h1><%= @post.title %></h1>
<small>
submitted <%= time_ago_in_words(@post.created_at) %> ago by
<%= @post.user.name %>
</small>
<p><%= @post.body %></p>
</div>
<div class="col-md-4">
<% if policy(@post).update? %>
<%= link_to "Edit", edit_topic_post_path(@post), class: 'btn btn-success' %>
<% end %>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment