/ Published in: Other
Expand |
Embed | Plain Text
# generates a random string # thanks to snippet : http://snippets.dzone.com/posts/show/2111 def random_string(size=16) (1..size).collect { (i = Kernel.rand(62); i += ((i < 10) ? 48 : ((i < 36) ? 55 : 61 ))).chr }.join end
You need to login to post a comment.
