lib/recaptcha/adapters/controller_methods.rb
def recaptcha_response_token(action = nil)
        response_param = params['g-recaptcha-response-data'] || params['g-recaptcha-response']
        response_param = response_param[action] if action && response_param.respond_to?(:key?)

        if response_param.is_a?(String)
          response_param
        else
          ''
        end
      end
# Extracts response token from params. params['g-recaptcha-response-data'] for recaptcha_v3 or
# params['g-recaptcha-response'] for recaptcha_tags and invisible_recaptcha_tags and should
# either be a string or a hash with the action name(s) as keys. If it is a hash, then `action`
# is used as the key.
# @return [String] A response token if one was passed in the params; otherwise, `''`
Extracts response token from params.
Extracts response token from params .
def recaptcha_response_token(action = nil)
        response_param = params['g-recaptcha-response-data'] || params['g-recaptcha-response']
        response_param = response_param[action] if action && response_param.respond_to?(:key?)
        if response_param.is_a?(String)
          response_param
        else
          ''
        end
      end
def recaptcha_response_token ( action = nil ) response_param = params [ 'g-recaptcha-response-data' ] || params [ 'g-recaptcha-response' ] response_param = response_param [ action ] if action && response_param . respond_to? ( :key? ) if response_param . is_a? ( String ) response_param else '' end end
Extracts response token from params.
Extracts response token from params .
A response token if one was passed in the params; otherwise, `''`
A response token if one was passed in the params ; otherwise ` ' ' `
String
action