Are you sure your database schema includes the proper “editora_id” field
in your “livros” table?
What’s the exact output when you do a script/console and try to create
it?? Does it come out something like this (Notice the @attributes
including the editora_id field):
Well my schema did not include the “editora_id†field, because I thought
rails would take care of it after I declared the relationship on the
model. Lazy me, I wanted the rails to do all the work.
And thanks you solved my problem
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.