These are chat archives for edbirmingham/network

Nov 2018
Anthony Crumley
Nov 03 2018 13:43
@Trevonte That problem will get resolved when you get to 8.1. The Comment model has a reference to the Article model via the belongs_to. As long as there is a Comment that exists referring to an Article, that particular Article cannot be deleted. This is called a "foreign key constraint" as the error message indicates. If you create a new Article without any comments then you should be able to delete it.
Once 8.1 is completed then you should be able to delete an Article regardless of whether it has Comments because the dependent: :destroy option will delete all the associated Comments before deleting the Article.
Nov 03 2018 17:21
@anthonycrumley Okay, I was thinking that it would be something along that line. Usually if there would be an error the guide would tell me, I'm shocked that it didn't!