Skip to content

Instantly share code, notes, and snippets.

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