Best way to handle associated object creation WithIN the SAM


#1

hi,

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
teaser.

help