On Fri, Mar 5, 2010 at 7:22 AM, M I R
<m.irfansb-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
> I want to insert data into multiple database tables from a single
> form, look at the detail.
>
> tables: patients, patient_history, patient_address,
>
> first i will insert data into patient table and then the patient
> primary key will be used as foreign key in patient_history and
> patient_address from a single form. There is another issue that
> patient history will be multiple (ajax will be used to add multiple
> entries)
>
> http://www.thatsquality.com/examples/author-form
>
> This example will give you the idea of adding multiple forms. It is
> for symfony which use the concept of embedded form which provide
> symfony. How will i add this functionlity in rails, please help.
>
Hi,
Ryan Bates did two episodes of Railscasts recently that will help you:
http://railscasts.com/episodes/196-nested-model-form-part-1
http://railscasts.com/episodes/197-nested-model-form-part-2
--
Gael Muller
--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.