Flowdock
method

random_number

Importance_1
Ruby on Rails latest stable (v4.0.2) - 0 notes - Class: ActiveSupport::SecureRandom

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v3.0.9) is shown here.

random_number(n=0) public

SecureRandom.random_number generates a random number.

If an positive integer is given as n, SecureRandom.random_number returns an integer: 0 <= SecureRandom.random_number(n) < n.

If 0 is given or an argument is not given, SecureRandom.random_number returns an float: 0.0 <= SecureRandom.random_number() < 1.0.

Show source
Register or log in to add new notes.