Hi,
How can I know the iteration number of a render (:partial) iterating
through a collection?
Example:
I got a collection containing 3 elements:
*John
*Pierre
*Chris
John would respond to 1, Pierre to 2 and Chris to 3 and so on…
Kind of like the cycle method acts but to know the iteration number.
Guillaume C.
Guillaume,
Try partialname_counter:
http://www.db75.com/new_blog/?p=177
http://www.db75.com/new_blog/?p=177
Regards,
Dennis
From: [email protected]
[mailto:[email protected]] On Behalf Of Guillaume
Carbonneau
Sent: Thursday, August 17, 2006 8:56 AM
To: [email protected]
Subject: [Rails] Knowing the partial iteration number
Hi,
How can I know the iteration number of a render (:partial) iterating
through a collection?
Example:
I got a collection containing 3 elements:
*John
*Pierre
*Chris
John would respond to 1, Pierre to 2 and Chris to 3 and so on…
Kind of like the cycle method acts but to know the iteration number.
Guillaume C.
On 8/17/06, Dennis B. [email protected] wrote:
Regards,
Dennis
God thanks!
Guillaume C.