I am creating a seeds file to popular my database, this file is responsible for popular Grupos(model :grupo)
that runs without problem and also popular TipoAtividade(model :tipo_atividade)
, which belongs to the group. >
WhenIrunrakedb:seed
itrunsnormallyandgeneratesthegroupsandappearstohavegeneratedthetypestoo,justbelowthecodeoftheseedsfile.
ButwhenIlookatthedatabase,thisiswhatappears.
Itcreatesarowinthedatabase,butdoesnotsavethedatainthenamecolumnsandthegrupo(grupo_id)
reference. Iwouldliketoknowwhatishappening,asIhaveresearchedtheinternetandfoundnothingthatwasveryclearaboutthisproblem.Igottoseesomethingof"protected_attributes", but the gem conflicts with certain versions of rails and / or bundler, I could not identify.
If the question is not clear, just ask me to edit it.