我有这个erb文件:
<div class="portlet-body">
<% @products.each_with_index do |product, idx| %>
<% if (idx % 4) == 0 and idx > 0 %>
</div>
<% end %>
<% if (idx % 4) == 0 %>
<div class="row-fluid">
<% end %>
<%= render :partial => 'products/small', :locals => { :product => product} %>
<% end %>
</div>
我怎样才能用 HAML 写这个?