From: Jamis Buck Date: 2005-03-02T05:19:11+09:00 Subject: Re: for vs. each On Mar 1, 2005, at 10:36 AM, Gavri Fernandez wrote: > On Mon, 28 Feb 2005 04:54:58 +0900, Fear Dubh > wrote: > >> Is there any circumstance where it would be better to use "for"? > > In eRuby templates when used with html. > The each() construct just doesn't gel with html. > > <%for item in @items%> > ......... > <%end> > > looks way better than > > <%@items.each do%> > ............ > <%end%> > > That though is just my opinion. Whatever makes you happy, folks :) It's definitely a matter of personal esthetics. To me, the #each invocation looks cleaner. :) - Jamis