From: JimNJ72 Date: 2006-03-05T14:48:40+09:00 Subject: Writing to Parent and Child table at the same time I am new to Ruby on Rails and Relationonal Database Development in general. I have been a notes/domino (formula, lotusscript), html, javascript coder for 10 years. I am building user authentication into a new app and am stuck right at the beginning. I have a MySQL database called ACT and have two tables one being uat (parent table) which has a, id, username and password. I then have another uai (child) which holds other info such as address, city, state, zip, first name, last name, etc. I would like to keep the two seperate. The child table also has a foreignID (I think thats what its called) which is called uat_id which creates the relationship between the tables. I have generated the model and controller in rails and setup the scaffold: uat and scaffold :uai as well as setting the belongs to relationship in the uai and the has one relationship in the uat because each user record should also only have one user info record. My question is how do I get the data populated in both tables (parent and child) using one form. The auto generated rails NEW works independently for the Parent and did work independently for the child before I setup the relationship. I plan on replacing with a custom form anyhow in the future so thats not a problem but how do I get one form submit to write or update both tables with the fields on one form that come from both tables. Any help or direction would be greatly appreciated. Thanks, Jim jimnj72@optonline.net