From 04050fbd46d7758873b33dd6f5648cc37183b078 Mon Sep 17 00:00:00 2001 From: Claire Date: Mon, 24 Jan 2022 21:29:50 +0100 Subject: [PATCH] Please CodeClimate --- Gemfile | 2 +- app/controllers/concerns/captcha_concern.rb | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 282ab65e404..67c50d19faf 100644 --- a/Gemfile +++ b/Gemfile @@ -157,4 +157,4 @@ gem 'connection_pool', require: false gem 'xorcist', '~> 1.1' -gem "hcaptcha", "~> 7.1" +gem 'hcaptcha', '~> 7.1' diff --git a/app/controllers/concerns/captcha_concern.rb b/app/controllers/concerns/captcha_concern.rb index 5a23e59e306..5bc4ba92051 100644 --- a/app/controllers/concerns/captcha_concern.rb +++ b/app/controllers/concerns/captcha_concern.rb @@ -35,14 +35,14 @@ module CaptchaConcern if verify_hcaptcha session[:captcha_passed_at] = Time.now.utc - return true + true else if block_given? message = flash[:hcaptcha_error] flash.delete(:hcaptcha_error) yield message end - return false + false end end