Rails: inserting values into multiple tables at a time..

i am working on ruby on rails. i got struck with DB query..

              How to insert the values (which read from text fields)
into multiple tables at a time(the tables have relation ship with
foreign key).