From 40c9c61a82d984e2dbd4a0719982d35fd1715f18 Mon Sep 17 00:00:00 2001 From: Jason Lee Date: Wed, 1 Apr 2020 19:15:50 +0800 Subject: [PATCH] Fix session invalid warning, only for development env --- lib/rucaptcha/controller_helpers.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/rucaptcha/controller_helpers.rb b/lib/rucaptcha/controller_helpers.rb index 2caaaf8..fc32738 100644 --- a/lib/rucaptcha/controller_helpers.rb +++ b/lib/rucaptcha/controller_helpers.rb @@ -84,6 +84,8 @@ module RuCaptcha end def warning_when_session_invalid + return unless Rails.env.development? + Rails.logger.warn " WARNING! The session.id is blank, RuCaptcha can't work properly, please keep session available. More details about this: https://github.com/huacnlee/rucaptcha/pull/66