search for: with_index

Displaying 1 result from an estimated 1 matches for "with_index".

2007 Aug 15
4
Is there a automatic counter variable?
Does ruby have anything where if I''m going through a do-while loop, or a "3.times" loop or "for product in products" where there''s a variable that will tell me which iteration of the loop I''m on? Instead of havign to declare my own counter = 0 and then increment it each time? Seems like something Rails would have... I can''t seem to find