Last Updated: February 25, 2016
·
257
· sippndipp

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).