On Sat, Jun 10, 2017 at 6:50 PM, fugee ohu <
fuge...@gmail.com> wrote:
> ... so I took out the Profile model
What does "took out" mean? What exactly did you do? Is it the
exact reverse of how you created that model to start with?
> ActiveRecord::InvalidForeignKey (Mysql2::Error: Cannot add or update a child
> row: a foreign key constraint fails (`socialnetworking_development`.`posts`,
> CONSTRAINT `fk_rails_cd61a4aa45` FOREIGN KEY (`user_id`) REFERENCES
> `profiles` (`id`)):
Given that you're seeing a *database-generated* error -- have you
looked at the relationships, i.e. foreign keys, in the referenced tables
in that database?
--
Hassan Schroeder ------------------------
hassan.s...@gmail.com
twitter: @hassan
Consulting Availability : Silicon Valley or remote