Let users reply to comments

Previously: comments only replied to posts
Problem: reddit has really neat threaded conversations of comments replying to comments replying to comments, replying to (etc)
Solution: 
-make comments belong to a polymorphic "parent" which they are responding to (either posts or other comments)
-make the _comment partial recursive, so that a comment displays all its replies just below it in a nested list
Yeah, they don’t need to be different since they are just helping set up a form.




On July 29, 2014 at 17:10:31, garthgoldwater (notifications@github.com) wrote:

In app/controllers/posts_controller.rb:

> @@ -15,6 +15,7 @@ def create
>    def show
>      @post = Post.find(params[:id])
>      @comment = Comment.new
> +    @reply = Comment.new
@comment is for the form that lets you comment on a post. @reply is for the form that lets you reply to a comment. I guess they don't need to be different though

—
Reply to this email directly or view it on GitHub.