From 3bf67c0994c279d7836dc344ecd63f1483086d1b Mon Sep 17 00:00:00 2001 From: flypiggy Date: Fri, 20 May 2016 10:20:20 +0800 Subject: [PATCH] Delete rucapcha after verify (#23) --- lib/rucaptcha/controller_helpers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/rucaptcha/controller_helpers.rb b/lib/rucaptcha/controller_helpers.rb index 78b3d6a..e143515 100644 --- a/lib/rucaptcha/controller_helpers.rb +++ b/lib/rucaptcha/controller_helpers.rb @@ -20,7 +20,7 @@ module RuCaptcha # Captcha chars in Session expire in 2 minutes valid = false if (Time.now.to_i - rucaptcha_at) <= RuCaptcha.config.expires_in - valid = captcha.present? && captcha == session[:_rucaptcha] + valid = captcha.present? && captcha == session.delete(:_rucaptcha) end if resource && resource.respond_to?(:errors)