Ruby generate random number, doing it right.
SecureRandom.random_number(maximum)
Written by Ben
Related protips
1 Response
Do:
$ require "securerandom"
If you get error:
NameError: uninitialized constant SecureRandom
over 1 year ago
·
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#