Module: Katalyst::GoogleApis::FormBuilder

Defined in:
app/helpers/katalyst/google_apis/form_builder.rb

Defined Under Namespace

Classes: RecaptchaField

Instance Method Summary collapse

Instance Method Details

#recaptcha_field(attribute = :recaptcha_token, action: object_name, site_key: GoogleApis.config.recaptcha.site_key) ⇒ Object



6
7
8
9
10
11
12
# File 'app/helpers/katalyst/google_apis/form_builder.rb', line 6

def recaptcha_field(attribute = :recaptcha_token, action: object_name,
                    site_key: GoogleApis.config.recaptcha.site_key)
  safe_join([
              RecaptchaField.new(action:, attribute:, site_key:).render(self),
              hidden_field(attribute),
            ])
end