E
E
eldar_web2015-05-20 14:57:27
Ruby on Rails
eldar_web, 2015-05-20 14:57:27

How to show numbering with @array.each in Rails?

I output data to the table through each, but with this I want to show the numbering, how can I show them with a cycle? ID, and i=0 i++ - do not offer.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rushka, 2015-05-20
@eldar_web

array.each_with_index { |element, index| ...}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question