For this assignment student will be adding an association and validations to the blog they started on the previous assignment.
Post “has many” Comments association
Create a “has many” relationship for posts to comments. The previous assignment already made sure a
comment belongs to a post (“post id” is already in the comments table, and if you used the references
generator, the belongs to statement is already in Comments).
Also, add a destroy dependency to the has many comments relationship in the Post model. This ensures a
comment that belongs to a post will be destroyed along with the post.
Then, test this with rails console.
Create Nested Resources