random numbers/characters for a spam preventer

The following will give you a random 8-number/character string assuming you have an object called @user (or whatever gets created upon registration/create):

MD5.hexdigest((@user.object_id + rand(255)).to_s).to_s[0..7]

You can also use captchas (Completely Automated Public Turing Test to Tell Computers and Humans Apart) which are those images you see with random numbers:

[http://captcha.rubyforge.org](http://captcha.rubyforge.org)/

Steven