title: Rails: Avoiding duplication errors in Factory Girl...am I doing it wrong?
body: <p>Suppose I have a model <code>user</code>, which has a uniqueness constraint on the <code>email</code> field</p>
  
  <p>If I call <code>Factory(:user)</code> once all is well, but if I call it a second time it'll fail with an "entry already exists" error.</p>
  
  <p>I'm currently using a simple helper to search for an existing entry in the DB before creating the factory...and calling any factory I make through that helper.</p>
  
  <p>It works, but it's not entirely elegant, and considering how common I assume this problem must be, I'm guessing there's a better solution. So, is there an inbuilt way in factory girl to <code>return_or_create</code> a factory, instead of just charging ahead with <code>create()</code>? If not, how do most folk avoid duplicate entries with their factories?</p>