# Nested Resource Single Form

**URL:** <https://www.ruby-forum.com/t/nested-resource-single-form/114749>\
**Category:** Rails\
**Created:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/nested-resource-single-form/114749 "2007-09-17T13:25:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davox](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/90ced4/32.png) [@davox](https://www.ruby-forum.com/u/davox)\
**Post date:** [September 17, 2007, 1:25pm UTC](https://www.ruby-forum.com/t/nested-resource-single-form/114749/1 "2007-09-17T13:25:09Z")

</div>

Hi all, I’m curious to what is the best practice/solution for  
handling one-to-many relationships in a single form not using AJAX.  
For example, if I have a question with many choices (e.g. a multiple  
choice survey), It’s generally a better user experience to have a form  
that allow the user to edit the question & the choices on the same  
form (one save instead of multiple save). For non-RESTful solution, I  
generally use field\_for inside another form\_for. However, lumping all  
these info into one form seems to be break Rail’s RESTful convention.  
On top of it all, whenever I face this kind of single-form x-to-many  
CRUD, I generally find myself writing a semi-complex validation loop.  
Do you guys have any other solutions to this problem? I await for  
your wisdom. 🙂

David
