title: How can I in HAML nesting a div inside a loop?
body: <p>I have this erb file:</p>
  
  <pre><code>    &lt;div class="portlet-body"&gt;
    &lt;% @products.each_with_index do |product, idx| %&gt;
      &lt;% if (idx % 4) == 0 and idx &gt; 0 %&gt;
        &lt;/div&gt;
      &lt;% end %&gt;
      &lt;% if (idx % 4) == 0 %&gt;
        &lt;div class="row-fluid"&gt;
      &lt;% end %&gt;
        &lt;%= render :partial =&gt; 'products/small', :locals =&gt; { :product =&gt; product} %&gt;
  
    &lt;% end %&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>How can I write this in HAML? </p>