I am using
rand(200)
in my Rails application. When I run it in console it always returns random number, but if I use it in appl
Try Random.rand(). For example
Random.rand()
Random.rand(200)
Or if you're working with an array you could use sample.
sample
[*1..200].sample