Sha256: f53d25f61597c3fde478724a2e6c787158c185ab5db0929a517afd4a3a67870e
Contents?: true
Size: 485 Bytes
Versions: 28
Compression:
Stored size: 485 Bytes
Contents
# frozen_string_literal: true module ActiveElement module Components # Provides a convenience method for detecting a field should be classified as a secret, used # for censoring values or selecting the default form field type as `password_field`, etc. module SecretFields SECRET_FIELDS = %w[secret password].freeze def secret_field?(field) SECRET_FIELDS.any? { |secret_field| field.to_s.downcase.include?(secret_field) } end end end end
Version data entries
28 entries across 28 versions & 1 rubygems