From http://stackoverflow.com/questions/5910194/how-to-generate-unique-six-digit-alpha-numeric-code-in-ruby