title: rails: loop within loop error
body: <p>Can anybody tell, why this code works?</p>
  
  <pre><code>    &lt;% @products.each do |p| %&gt;
           &lt;%= link_to p.name, product_path(p.id), :class =&gt; "title" %&gt;
      &lt;%end%&gt;
  </code></pre>
  
  <p>And this doesn't?</p>
  
  <pre><code>    &lt;% @products.in_groups_of(2).each do |product_array| %&gt;
          &lt;% product_array.each do |p| %&gt;
            &lt;%= link_to p.name, product_path(p.id), :class =&gt; "title" %&gt;
          &lt;% end %&gt;
      &lt;%end%&gt;
  </code></pre>
  
  <p>The code gives error of undefined method `name' for nil:NilClass.
  I am not getting clue of it. Can anybody help?</p>