Rails how to index with in_groups_of
<p>I am displaying pictures in a view using in_groups_of to create rows of 3.  However, I need to do something different to the first item of the first row.  How can I target this item?</p>

<pre><code>&lt;% images.in_groups_of(3) do |row| %&gt;
  &lt;div class="row"&gt;
    &lt;% row.each_with_index do |image, index| %&gt;
      &lt;div class="item-wrapper"&gt;
        &lt;% if image %&gt;
          &lt;a class="flex-item" &lt;img class="photo" src="&lt;%= image.picture.medium.url %&gt;" alt="" /&gt;&lt;/a&gt;
        &lt;% end %&gt;
      &lt;/div&gt;
    &lt;% end %&gt;
  &lt;/div&gt;
&lt;% end %&gt;
</code></pre>

<p>I want to add this code below every anchor tag except the very first photo in the very first row.</p>

<pre><code>&lt;% if user.eql?(current_user) %&gt;
  &lt;button class="btn btn-xs btn-danger delete-image" data-id="&lt;%= image.id %&gt;"&gt;
    &lt;i class="fa fa-trash-o fa-lg"&gt;&lt;/i&gt;
  &lt;/button&gt;            
&lt;% end %&gt;
</code></pre>