From: Todd Burch Date: 2008-01-12T08:32:41+09:00 Subject: Re: Loop question Mark Mr wrote: > Todd, could you give me an example of how you might use .collect for > this? I tried doing it but I'm not quite sure i understand how to use it > in this situation. Keep in mind that for @this_question.answers.each, > every element of that is an answer object, not sure if that affects > methods that are performed on arrays. Actually, Robert's example with .find should suffice. .find is also in the Enumerable class. If you REALLY want an example with .collect, I can write one up for illustration purposes. The type of object in your array really does not matter. Todd -- Posted via http://www.ruby-forum.com/.