app/controllers/registrations_controller.rb
# verify reCaptcha was valid
#
# rubocop:disable Style/GuardClause
# rubocop:disable Metrics/MethodLength
verify reCaptcha was valid
rubocop:disable Style/GuardClause
rubocop:disable Metrics/MethodLength
verify reCaptcha was valid rubocop : disable Style / GuardClause rubocop : disable Metrics / MethodLength
def check_captcha
    return unless GoogleRecaptcha.enabled?
    self.resource = resource_class.new sign_up_params
    resource.validate 
    success = verify_recaptcha(
      action: 'registration',
      model: resource,
      attribute: :recaptcha,
      minimum_score: GoogleRecaptcha.minimum_score,
      secret_key: GoogleRecaptcha.secret_key
    )
    unless success
      set_minimum_password_length
      respond_with_navigational(resource) { render :new }
    end
  end
def check_captcha return unless GoogleRecaptcha . enabled? self . resource = resource_class . new sign_up_params resource . validate success = verify_recaptcha ( action : 'registration' , model : resource , attribute : :recaptcha , minimum_score : GoogleRecaptcha . minimum_score , secret_key : GoogleRecaptcha . secret_key ) unless success set_minimum_password_length respond_with_navigational ( resource ) { render :new } end end
verify reCaptcha was valid
rubocop:disable Style/GuardClause
rubocop:disable Metrics/MethodLength
verify reCaptcha was valid rubocop : disable Style / GuardClause rubocop : disable Metrics / MethodLength
# return if recaptcha is not enabled # Look for any other validation errors besides reCAPTCHA