count each loop

  • Thread starter Joel Saltzmanjoelh
  • Start date
J

Joel Saltzmanjoelh

I am trying to get the iteration number of a loop I am on. I tried

objects.each do |object, i|

but i is nil

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,533
Members
45,007
Latest member
OrderFitnessKetoCapsules

Latest Threads

Top