Relations - data not saved

Hello,

I’ve created 2 databases with a relation 1-N, for example 1 table
“tasks” and 1 table “categories”, I’ve done the relation 1-N (in task.rb
belongs_to :category and in category.rb has_many :tasks) and I’ve
created a form to have the possibility to choose a category in a
dropdown list when I create a task. The creation of a new task is well
done but without the field “category_id” stays empty?

Does someone help me with this problem? I really don’ understand
because another relation with the same principle works fine…

Thanks you

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs