|
|
@ -35,14 +35,14 @@ module CaptchaConcern
|
|
|
|
|
|
|
|
|
|
|
|
if verify_hcaptcha
|
|
|
|
if verify_hcaptcha
|
|
|
|
session[:captcha_passed_at] = Time.now.utc
|
|
|
|
session[:captcha_passed_at] = Time.now.utc
|
|
|
|
return true
|
|
|
|
true
|
|
|
|
else
|
|
|
|
else
|
|
|
|
if block_given?
|
|
|
|
if block_given?
|
|
|
|
message = flash[:hcaptcha_error]
|
|
|
|
message = flash[:hcaptcha_error]
|
|
|
|
flash.delete(:hcaptcha_error)
|
|
|
|
flash.delete(:hcaptcha_error)
|
|
|
|
yield message
|
|
|
|
yield message
|
|
|
|
end
|
|
|
|
end
|
|
|
|
return false
|
|
|
|
false
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|