Hi, in tour relationship below, you simply need has_one or belongs_to but not both. It really depends where you would like the foreign key.
For example, if you use has_one, then the foreign key, job_id, will be in the workers table. If you use the belongs_to, the foreign key, worker_id, should be in jobs table. Last but not least, I would recommend reading the guides.rubyonrails.com for further information. Also, they are a great resource for learning RoR. Good luck, -Conrad Sent from my iPhone On Jan 28, 2011, at 7:27 PM, Me <[email protected]> wrote: > Nope. > > class Worker < AR > has_one :job > end > > ---------------------- > class Job < AR > belongs_to :worker > end > > worker_id in this table > ------------------------- > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]. > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

