Created
June 1, 2016 16:30
-
-
Save CapeRatel/e5648cbe80ff1fa9e684e22a2551415d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def generate_uuid | |
loop do | |
uuid = SecureRandom.hex(11) | |
break uuid unless User.find_by(uuid: uuid) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment