How can I fix this code so it generates unique random letters and numbers in lower case?
api_string = (0...32).map{65.+(rand(25)).chr}.join
((('a'..'z').to_a + (0..9).to_a)*3).shuffle[0,(rand(100).to_i)].join
Replace rand(100) with rand(n) where n is the maximum length of your desired string.
rand(100)
rand(n)
n