On 20 August 2010 06:41, Bob Smith <[email protected]> wrote: > My model has two fields that I want in a customer list for an index > page. They are name and second_name. I need a way to combine them in a > collection with their id numbers so the Edit links will work. Sounds > like SQL, but I'm not sure.
I don't understand what you mean by 'their id numbers'. The household record will have an id but the individual fields do not, they just have the text of the name and second_name. Perhaps you are talking about relationships to other models rather than fields in the model? If so then we need to know the relationships. Colin > > maybe something like: > SELECT name, id FROM households and SELECT second_name, id FROM > households > > just not sure how to make ONE statement from these two including > both... > > Thanks > > Bob > > -- > 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. > > -- 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.

