# Construction of multiple model forms and controllers

**URL:** <https://www.ruby-forum.com/t/construction-of-multiple-model-forms-and-controllers/175311>\
**Category:** Rails\
**Created:** [September 11, 2009, 12:50am UTC](https://www.ruby-forum.com/t/construction-of-multiple-model-forms-and-controllers/175311 "2009-09-11T00:50:02Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![explainer](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/bbce88/32.png) [@explainer](https://www.ruby-forum.com/u/explainer)\
**Post date:** [September 11, 2009, 12:50am UTC](https://www.ruby-forum.com/t/construction-of-multiple-model-forms-and-controllers/175311/1 "2009-09-11T00:50:02Z")

</div>

I have a problem with the construction of a sequence of input forms.  
The model being created and edited is called a Portfolio. The  
portfolio contains multiple subordinate objects, such as Stock,  
AssetClasses, Sectors, and worker objects link StockPosition,  
SectorPosition, and AssetClassPosition. I have the belongs\_to and  
has\_many relationships working and have written scripts which  
demonstrate that once constructed, the associations work.

My customer wants the Portfolio object to be created across 3 distinct  
pages, call them P1, P2, and P3. I cannot seem to set up a controller  
and action methods which will allow me to create the Portfolio base  
object in a new/create pair of actions, and then allow multiple edits  
on the object, call them P1\_edit/P1\_update, P2\_edit/P2\_update,  
P3\_edit, P3\_update. I am also lost on how the routes should be  
configured to do this sort of thing.

Most things I have done with Rails up to this point were based on the  
RESTful style, which only allows for a single edit/update action pair  
on any given object. So, how does one construct a controller/routes/  
views set that will support a sequential creation and configuration of  
a given object?

I have been at this for 3 days now and my hair is getting whiter. I  
would appreciate some sound advice.

Thanks in advance for your help.
