app/views/posts/show.html.haml
#post_content
%h1= @post.title
%p.p-content= @post.content
#comments
%h2
= @post.comments.count
Comments
= render @post.comments
- if user_signed_in?
%h3 Reply to thread
= render "comments/form"
%br/
%hr/
%br/
- if @post.user == current_user
= link_to "Edit", edit_section_post_path(@section, @post), class: "button"
= link_to "Delete", section_post_path(@section, @post), method: :delete, data: { confirm: "Are you sure you want to do this?" }, class: "button"