title: In Rails how do I use find_each method with index?
body: <p>I can use Rails find_each method like :</p>
  
  <pre><code>User.find_each(:batch_size =&gt; 10000) do |user|
    ------
  end 
  </code></pre>
  
  <p>With find_each method is there any way to get the index of the array ? like :</p>
  
  <pre><code>User.find_each(:batch_size =&gt; 10000).with_index do |user, index|
    ------
  end 
  </code></pre>