Random Numbers in Ruby
Always use
ActiveSupport::SecureRandom.random_number
instead of
rand
to get real numbers for your A/B tests. Using passenger with rand can mess up your numbers (sometimes seed will not be reseeded after fork).
Written by Sebastian Deutsch
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Ruby
Authors
Related Tags
#ruby
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#