Forum: Ruby on Rails Join not using FK

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Gabriel P. (Guest)
on 2006-12-31 01:33
(Received via mailing list)
Hi, I'm trying to make a join not using an FK. For instance:

If a have a Model Person, Phone and Call. A person has many phones.
There's no relationship between Call and Phone. Here are the model

Person: name
Phone: number, person_id
Call: number_called, call_date

I want to join Phone and Call by the phone number.

I'd like to do: <%= %>

How can I make this kind of join?
This topic is locked and can not be replied to.