# Nested form

**URL:** <https://www.ruby-forum.com/t/nested-form/176906>\
**Category:** Rails\
**Created:** [October 7, 2009, 11:22pm UTC](https://www.ruby-forum.com/t/nested-form/176906 "2009-10-07T23:22:04Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![djtal](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/e9bcb4/32.png) [@djtal](https://www.ruby-forum.com/u/djtal)\
**Post date:** [October 7, 2009, 11:22pm UTC](https://www.ruby-forum.com/t/nested-form/176906/1 "2009-10-07T23:22:04Z")

</div>

Hello,

I’ve got a problem with the creation of a nested form for this  
situation

I’ve got 3 models as follow

Game  
-\> has\_many :authorships

Authorship  
-\> belong\_to :author  
-\> belong\_to :game

Author

> belong\_to :authorship

In my form the user can enter the author name when creating a new  
game.  
The application automatically create them if they don’t exist but all  
is hand made. i’musing a find\_or\_create under the wood  
i would like to use the nested from feature from rails 2.3 for this  
form but I cannot figure how to use it to create a new author if it  
doesn’t exist or find the corect author if it exist.

I somebody got some ideas for helping me, I appreciate much.

Thanks
