Newbie question: one to one relationships in ROR

A newbie to ROR, I have come to my first problem. We have two tables
lets call them toys and trucks that have a one to one relationship. Now
toys has_one truck and truck belongs_to toy. I have created the basic
scaffold for both tables. But in order to create a new truck the user
must first create a toy. What I am trying to do is create on page where
the user can enter the information that a toy needs and the information
that a truck needs and create a new record in the respective tables with
the truck’s FK linking to the toys table. Any pointers would be
helpful. Thanks!

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs