Different styles in loop

Mixed_in
Wed, 26 Jan 2011 15:02:10 -0000

Greetings friends,

what is the best way to deal with the next issue:

i have product partial(_product.html.erb), which look likes:

<% @products.each do |product| %>

<%= truncate(product.title, :length => 35) %>
	<%= image_tag(product.image_url, :size => ''80x80'')
%>
<%= truncate(sanitize(product.description), :length => 180)
%></
p>

<%= product.price
%>


<% end %>


form partial(_form.html.erb):




<%= render ''product'' %>




And the form partial is rendered in the index. My point is to make
border right and border bottom on each product, but to exlude border
right from all products which are at the at the right side of the
grid, and to remove all border bottom from the products which are at
the bottom of the grid.
Lets say we have product grid with 5 rows and 5 columns.
Would love some help about it.
Thanks in Advance

--
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at