On 12 Dec 2008, at 02:08, Bharat Ruparel wrote: > y: > > Coach.find :all, :select => 'c.id, a.id, a.name', > :joins => 'as c inner join accounts as a on a.id = > c.account_id', > :order => 'a.name' > > It is only returning the following in irb: > > [#<Coach id: 99>] > > That is, it fails to return the account.id (or a.id) and account.name > (or a.name) > > How do I resolve this? alias the account id to be something other than id.
Fred > > > Thanks in advance for your help and time. > > Bharat > -- > Posted via http://www.ruby-forum.com/. > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

