From: Hassan Schroeder Date: 2012-08-06T23:24:52+09:00 Subject: Re: Join with ActiveRecord using non-standard schema On Mon, Aug 6, 2012 at 5:19 AM, Tedi Roca wrote: > @agr = Agreement.find(:all, :include => :AgreementType) > > And it does not let me access the 'name' field: > > irb(main):081:0> puts @agr.name > NoMethodError: undefined method `name' for # There's a reason to use meaningful names :-) In this case your variable should be @agreements (plural) because an ActiveRecord find *all* returns an array, which of course has no 'name' method though e.g. @agreements.first.name should work. Note that the error message is telling you exactly that :-) HTH, -- Hassan Schroeder ------------------------ hassan.schroeder@gmail.com http://about.me/hassanschroeder twitter: @hassan