title: Check for successful creation of records on create rails
body: <p>I am looping through a CSV and creating new records for each row.  </p>
  
  <p>How can I increment a counter if the creation of a record was successful?</p>
  
  <p>Here is my existing code:</p>
  
  <pre><code>Employer.create(employer) do |e|
     e.password = generated_password
     e.tenant = tenant
  end
  </code></pre>
  
  <p>I'd like to increment a counter like <code>i+=1</code> if the <code>.create</code> worked.</p>