0
I’m creating a file Seeds for popular my database, this file is responsible for popular Grupos(model :grupo) that wheel without problem and also popular TipoAtividade(model :tipo_atividade), who belongs to the group.

When I spin the rake db:seed it runs normally and generates the groups and appears to have generated the types as well, just below the code of the file Seeds.

But when I look at the database that’s what comes up.

It creates a row in the database, but does not save the data in the name and reference columns of grupo(grupo_id).
I would like to know what is happening, because I have already researched on the Internet and found nothing that was very clear about this problem. I came to see something of "protected_attributes", but Gem conflicts with certain versions of Rails and/or bundler, I could not identify.
If the question is not clear just ask that I edit.
If the answer below has worked. You should mark it as "solved".
– Danilo Cândido