Module: Rack::Attack::Recaptcha::VerificationHelper

Defined in:
lib/rack/attack/recaptcha/verification_helper.rb

Instance Method Summary collapse

Instance Method Details

#verify_recaptcha_if_under_attack(options = {}) ⇒ Object



5
6
7
8
9
10
11
# File 'lib/rack/attack/recaptcha/verification_helper.rb', line 5

def verify_recaptcha_if_under_attack(options={})
  if request.env["rack.attack.use_recaptcha"]
    verify_recaptcha(options)
  else
    true
  end
end