File: view_methods.rb

package info (click to toggle)
ruby-recaptcha 5.21.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 208 kB
  • sloc: ruby: 662; makefile: 3
file content (26 lines) | stat: -rw-r--r-- 999 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# frozen_string_literal: true

module Recaptcha
  module Adapters
    module ViewMethods
      # Renders a [reCAPTCHA v3](https://developers.google.com/recaptcha/docs/v3) script and (by
      # default) a hidden input to submit the response token. You can also call the functions
      # directly if you prefer. You can use
      # `Recaptcha::Helpers.recaptcha_v3_execute_function_name(action)` to get the name of the
      # function to call.
      def recaptcha_v3(options = {})
        ::Recaptcha::Helpers.recaptcha_v3(options)
      end

      # Renders a reCAPTCHA [v2 Checkbox](https://developers.google.com/recaptcha/docs/display) widget
      def recaptcha_tags(options = {})
        ::Recaptcha::Helpers.recaptcha_tags(options)
      end

      # Renders a reCAPTCHA v2 [Invisible reCAPTCHA](https://developers.google.com/recaptcha/docs/invisible)
      def invisible_recaptcha_tags(options = {})
        ::Recaptcha::Helpers.invisible_recaptcha_tags(options)
      end
    end
  end
end