Todd Burch wrote: > 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 Ok well i tried again with .find and it wasnt working but then I replaced it with .detect and it worked fine. So i guess there's a difference there. Thanks for the help though :) -- Posted via http://www.ruby-forum.com/.