A
A
Art Snail2017-08-11 15:28:31
Ruby on Rails
Art Snail, 2017-08-11 15:28:31

How to get iteration index?

Hello.
When a collection is rendered in a view using each_with_index , you can get the index value, but how to get it if the collection is rendered using render @vars

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Grudinkin, 2017-08-11
@artsnail

It's not clear from the question what needs to be done.
3.4.5 Rendering Collections
With an Index
I hope this helps.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question