1
0
Fork 0
creddit/app/views/posts/show.html.slim

12 lines
433 B
Plaintext

- content_for(:title, link_to(@subcreddit.name, @subcreddit))
== render 'post', post: @post
- if @post.comments?
.title= "all #{@post.comments_count} comments"
- else
.title= "no comments (yet)"
- if policy(:comment).new?
= "Commenting as: #{current_user.username}"
== render 'comments/form', subcreddit: @subcreddit, post: @post, comment: @post.comments.build, parent: nil
.comments.contents
== nested_comments(@comments)