# relations - data not saved

**URL:** <https://discuss.rubyonrails.org/t/relations-data-not-saved/29458>\
**Category:** rubyonrails-talk\
**Created:** [May 16, 2008, 2:17pm UTC](https://discuss.rubyonrails.org/t/relations-data-not-saved/29458 "2008-05-16T14:17:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![11175](https://avatars.discourse-cdn.com/v4/letter/1/8edcca/32.png) [@11175](https://discuss.rubyonrails.org/u/11175)\
**Post date:** [May 16, 2008, 2:17pm UTC](https://discuss.rubyonrails.org/t/relations-data-not-saved/29458/1 "2008-05-16T14:17:49Z")

</div>

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
