belongs_to question

Previous Topic Next Topic
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

belongs_to question

Scott Phelps
Looking for some advice here:

I have a models set up like this:
class Project

class ContractorItem
   belongs_to :project

class EngineerItem
   belongs_to :project

Now, to create a new Project I have these views:

 >>> These views are set up as CSS tabs that the user can click  
between and modify before clicking a "Create Project" link.

The goal is to collect all of the form data in a session and have  
that form data repopulated during the Project creation until the user  
clicks "Create Project" upon which the session will be reset and the  
Objects will get saved to the database (after validation - of course)

Can someone show me the syntax for creating a Project Object in a  
session and then subsequently add these ContractorItem and  
EngineerItem Objects to that Project?
Rails mailing list
[hidden email]