From: Hassan Schroeder Date: 2012-08-07T00:54:19+09:00 Subject: Re: Join with ActiveRecord using non-standard schema On Mon, Aug 6, 2012 at 8:38 AM, T- Di wrote: > The table AgreementType contains the field 'name' that I want to use. > > Quick recap from the first message: > - There are 2 tables for which I created individual classes: > a. Agreement > b. AgreementType > - The field 'AGREEMENT_TYPE_ID' is present in both tables, so I can use > it to join their contents. > - The field 'name' is on the AGREEMENT_TYPE_ID OK, so it's not a method of Agreement. Then you're looking for e.g. @agreements.first.agreement_type.name Maybe worth reviewing the Rails guide on AR relationships... -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan