From 5d9031917a591bf885b287ffb8b0a57eba6351cd Mon Sep 17 00:00:00 2001 From: nakajijapan Date: Wed, 30 Jan 2013 20:51:49 +0900 Subject: [PATCH] use session_id at SimpleCaptcha::Utils::generate_key() --- lib/simple_captcha/view.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/simple_captcha/view.rb b/lib/simple_captcha/view.rb index fc57080..65632fd 100644 --- a/lib/simple_captcha/view.rb +++ b/lib/simple_captcha/view.rb @@ -106,9 +106,9 @@ def generate_simple_captcha_data(code) def simple_captcha_key(key_name = nil) if key_name.nil? - session[:captcha] ||= SimpleCaptcha::Utils.generate_key(session[:id].to_s, 'captcha') + session[:captcha] ||= SimpleCaptcha::Utils.generate_key(session[:session_id].to_s, 'captcha') else - SimpleCaptcha::Utils.generate_key(session[:id].to_s, key_name) + SimpleCaptcha::Utils.generate_key(session[:session_id].to_s, key_name) end end end