Guillaume,
Try partialname_counter:
http://www.db75.com/new_blog/?p=177
<http://www.db75.com/new_blog/?p=177>
Regards,
Dennis
________________________________
From: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] On Behalf Of Guillaume
Carbonneau
Sent: Thursday, August 17, 2006 8:56 AM
To: rails@lists.rubyonrails.org
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 Carbonneau
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060817/afe876fa/attachment.html