Added bigger pool for random seeds, now with a 9 * 10e-07 % of chance of appearing, also added test to cover edge cases (case in fact, the coincidence of the seeds it's correct)
Conflicts: app/controllers/budgets/investments_controller.rb
This commit is contained in:
@@ -95,7 +95,7 @@ module Budgets
|
||||
|
||||
def set_random_seed
|
||||
if params[:order] == 'random' || params[:order].blank?
|
||||
seed = rand(-100..100) / 100.0
|
||||
seed = params[:random_seed] || session[:random_seed] || rand(-100000..100000)
|
||||
params[:random_seed] ||= Float(seed) rescue 0
|
||||
else
|
||||
params[:random_seed] = nil
|
||||
|
||||
Reference in New Issue
Block a user