# build with nested forms

**URL:** <https://discuss.rubyonrails.org/t/build-with-nested-forms/73728>\
**Category:** rubyonrails-talk\
**Created:** [November 2, 2019, 1:16pm UTC](https://discuss.rubyonrails.org/t/build-with-nested-forms/73728 "2019-11-02T13:16:20Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![arielj](https://sea2.discourse-cdn.com/rubyonrails/user_avatar/discuss.rubyonrails.org/arielj/32/689_2.png) [@arielj](https://discuss.rubyonrails.org/u/arielj)\
**Post date:** [November 2, 2019, 1:16pm UTC](https://discuss.rubyonrails.org/t/build-with-nested-forms/73728/1 "2019-11-02T13:16:20Z")

</div>

@item.item\_item\_properties.item\_property\_id is wrong, @item.item\_item\_properties is a collection, use `[iip.object.item_property.name](http://iip.object.item_property.name)` and `iip.object.item_property_id` instead.

imagine @item.item\_item\_properties is something like an array [item\_item\_property1, item\_item\_property2], you can’t call `item_property_id` on an array, you have to call it on one of the items inside it, and that “iip” variable, if you call `.object` on it you get that item from within the array.

---

<div class="post-metadata">

**Author:** ![Joe\_Guerra](https://avatars.discourse-cdn.com/v4/letter/j/c89c15/32.png) [@Joe\_Guerra](https://discuss.rubyonrails.org/u/Joe_Guerra)\
**Post date:** [November 2, 2019, 3:52pm UTC](https://discuss.rubyonrails.org/t/build-with-nested-forms/73728/2 "2019-11-02T15:52:04Z")

</div>

check out the cocoon gem, it made nested forms really simple.
