The problem with this segment of code is that when I try to display a
document’s ID number, it displays the companies’ ID number, since the
join overwrites @documents.id with companies.id.
The problem with this segment of code is that when I try to display a
document’s ID number, it displays the companies’ ID number, since the
join overwrites @documents.id with companies.id.
How can I prevent this?
Thanks,
Ben L.
If you are doing the join just so that you can sort on companies.name,
then I suppose the easiest thing is to use :select => ‘documents.*’
Fred
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.