creddit/app/views/comments/show.html.slim

10 lines
503 B
Text

- content_for(:title, link_to(@subcreddit.name, @subcreddit))
== render 'posts/post', post: @post
.alert.alert-info.in-page
p you are viewing a single comment's thread.
p #{link_to 'view the rest of the comments', subcreddit_post_path(@subcreddit, @post)} →
- if policy(:comment).new?
= "Commenting as: #{current_user.username}"
== render 'comments/form', subcreddit: @subcreddit, post: @post, comment: @post.comments.build, parent: @comment
.comments.contents
== nested_comments(@comments)