title: In Rails how would one generate a unique serial number for a new instance of a model?
body: <p>In Rails, I'm looking for a way to generate an auto-incrementing serial number for internal record keeping for new instances of a model. I would like to avoid creating database specific code and rather have a solution that will work regardless of the database. My current idea is to wait until the model is saved and then grab the ID of the saved model and use that as a suffix of the serial number, but then I would have to save each record twice on creation. </p>
  
  <p>Any ideas? </p>
  
  <p>Thanks for looking!</p>