Create UUID's in Ruby with a few simple commands
Make sure you have the uuid gem installed:
gem install uuid
Then just do this:
require 'uuid'
uuid = UUID.new
uuid_string = uuid.generate
Now you've got a string with a UUID in it. There are a lot more options available in this library so you should read up on the documentation.
Written by Josh Kerr
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#N
Authors
Related Tags
#n
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#