title: DRYest way to check if in the first iteration of an .each loop in Ruby/Rails
body: <p>In my <code>.erb</code>, I have a simple <code>each</code> loop:</p>
  
  <pre><code>&lt;%= @user.settings.each do |s| %&gt;
    ..
  &lt;% end %&gt;
  </code></pre>
  
  <p>What is the simplest way to check if it's currently going through its first iteration? I know I could set <code>i=0...i++</code> but that is just too messy inside of an <code>.erb</code>. Any suggestions?</p>