When I want to display the index of a collection in the following statement:
<%= render :partial => "subscription", :collection => @subscriptions %>
I can say:
<%= subscription_counter + 1 %>
The pattern is "partial_name_counter"
More here:
http://www.pgrs.net/2007/7/20/render-partial-with-collection-has-hidden-counter
Notes to self
Wednesday, January 2, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment