From: Sam Mayes Date: 2005-09-01T05:02:57+09:00 Subject: Re: building a gallery layout ------=_Part_4351_25053691.1125518573290 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline ok here is what i did may not be the most elegant but it works. thanks for= =20 the help. any Ideas to make it better are welcome. <% counter =3D 0 %> <% 5.times do %> <% 5.times do %> <% if @systems[counter] %> <% else %> <% end %> <% counter+=3D1 %> <% end %> <% end %>=20
Company
<% for price in @systems[counter].prices %> <% end %>
<%=3D @systems[counter].company.name %> <%=3D @systems[counter].model %> <%=3D @systems[counter].sid %> <%=3D @systems[counter].sm_img %>
<%=3D price.price %> <%=3D price.store_name %>
On 8/31/05, Josh Charles wrote: >=20 > an array-less way to do it >=20 > pictures[] > counter =3D 0 >=20 > 5.times do > puts "" > 5.times do > if ( pictures[ counter ] ) exists > puts "" + image code + "" > else > puts "" > end > counter ++ > end > puts "" > end >=20 > I think that is almost legal ruby code. I'm new to ruby, so I don't > know exactly. There is probably an even better way of doing this. > I'm really gray on ruby array handling >=20 > ------=_Part_4351_25053691.1125518573290--