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