Module: RedisCaptcha::Controller

Defined in:
lib/redis_captcha/controller.rb

Instance Method Summary collapse

Instance Method Details

#generate_captcha_keyObject



5
6
7
8
9
10
# File 'lib/redis_captcha/controller.rb', line 5

def generate_captcha_key
  if session[:captcha_key].blank?
    uuid = UUID.new
    session[:captcha_key] = uuid.generate.gsub("-", "").hex
  end
end