title: RecordNotUnique Error showing up in the logs
body: <p>I have a pretty standard devise setup with a User model. There is a unique index on email for that table in the schema. </p>
  
  <p>When a user tries to signup a nice error message is given - email already taken. </p>
  
  <p>Occasionally, in the logs an error shows up:</p>
  
  <pre><code>/app/controllers/users/registrations_controller.rb", line 5 in create:    
  PG::UniqueViolation: ERROR:  duplicate key value violates unique constraint "index_users_on_email"
  </code></pre>
  
  <p>It isn't a race-condition because the error has been reported days after the user first signed up. </p>
  
  <p>I can't recreated the issue by signing up on the site with the existing email. </p>
  
  <p>What might be happening here? I'm not sure what steps to take to investigate it. </p>
  
  <p>UPDATE: Registrations code: </p>
  
  <pre><code>  def create
      super  #ln 5
      if resource.active_for_authentication?
        flash[:tracking_partial] = "registration_complete"
      end
    end
  </code></pre>