T
T
Tinord2018-03-23 10:51:01
ruby
Tinord, 2018-03-23 10:51:01

How unique is the value?

Hello.
I would like to know how unique the counter is and does it check values ​​from the database?
get_eight_digit_id = lambda { |range| x = Random.new.rand(range); return Order.find_by_id(x) ? get_eight_digit_id.call(range) : x }

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question