Rubies and Gems: UUID
Often your application needs some form of UUID. For example for "Secret URLs" or Persistent Logins. I found the uuidtools to be very useful for this task. It allows you to create various forms of UUIDs (i.e. MD5, SHA1, Timestamp or Random).
Get the gem
CODE:
-
sudo gem install uuidtools
And generate UUIDs
RUBY:
-
UUID.random_create.to_s
-
-
UUID.timestamp_create.to_s
and thats all there is about it.
Resources:
back