Forum: Ruby on Rails belongs_to question

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
9b995363bb34f302bdd7705b8490e07a?d=identicon&s=25 Scott Phelps (Guest)
on 2005-12-16 07:15
(Received via mailing list)
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?
This topic is locked and can not be replied to.