quotes random seed
This commit is contained in:
@@ -77,7 +77,8 @@ module Budgets
|
||||
def set_random_seed
|
||||
if params[:order] == 'random' || params[:order].blank?
|
||||
params[:random_seed] ||= rand(99)/100.0
|
||||
Budget::Investment.connection.execute "select setseed(#{params[:random_seed]})"
|
||||
seed = Budget::Investment.connection.quote(params[:random_seed])
|
||||
Budget::Investment.connection.execute("select setseed(#{seed})")
|
||||
else
|
||||
params[:random_seed] = nil
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user