Answer the question
In order to leave comments, you need to log in
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
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 questionAsk a Question
731 491 924 answers to any question