Forum: Ruby on Rails Best way to handle associated object creation WithIN the SAM

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.
olivier Hericord (Guest)
on 2005-12-30 23:39
(Received via mailing list)

let's take a very simple example.

2 tables: people and phones
One person has_many :phones
One phone belongs_to :person
(the phone table contains a person_id)

i began with the classical scaffold generator for the main form (the
people form)....

How can i add a phone , associated to the NOT YET SAVED person objet ,
with an ajax mean?

do i have to put the unsaved person in session to be abble to
associate a new phone to it with ajax?

just trying to make a single screen address book like in the joyent

This topic is locked and can not be replied to.