Is there any method for getting the current iteration (for changing row
colors) in the category partial?
<%=render(:partial => “category”, :collection => @categories)%>
thanks,
andy
–
Andrew S.
Is there any method for getting the current iteration (for changing row
colors) in the category partial?
<%=render(:partial => “category”, :collection => @categories)%>
thanks,
andy
–
Andrew S.
Andrew :
Is there any method for getting the current iteration (for changing row
colors) in the category partial?<%=render(:partial => “category”, :collection => @categories)%>
Use the variable category_counter in your partial.
– Jean-François.
–
Ruby ( http://www.rubyfrance.org ) on Rails ( http://www.railsfrance.org
)
Use the variable category_counter in your partial.
– Jean-François.
Thanks so much! I knew there had to be something there…just couldn’t
find
it.
–
Andrew S.
On 2/17/07, Aaron [email protected] wrote:
Aaron
That is cool. I wish I new that before I wrote my row_class method.
–
Andrew S.
Andy,
The cycle method is a great way to do this. Here is an example:
Then just style ListLine0 and ListLine1.
Aaron
That is cool. I wish I new that before I wrote my row_class method.
Also wish I could spell…
sorry for the extra noise.
–
Andrew S.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs