class method self.new

Ruby on Rails 7.0.10

Since v6.0.6

Available in: v6.0.6 v6.1.7.10 v7.0.10 v7.1.6 v7.2.3 v8.0.4 v8.1.2

Signature

self.new(filters = [], mask: FILTERED)

Create instance with given filters. Supported type of filters are String, Regexp, and Proc. Other types of filters are treated as String using to_s. For Proc filters, key, value, and optional original hash is passed to block arguments.

Options

  • :mask - A replaced object when filtered. Defaults to "[FILTERED]".

Parameters

filters opt = []
mask key = FILTERED
Source
# File activesupport/lib/active_support/parameter_filter.rb, line 46
    def initialize(filters = [], mask: FILTERED)
      @filters = filters
      @mask = mask
    end

Defined in activesupport/lib/active_support/parameter_filter.rb line 46 · View on GitHub · Improve this page · Find usages on GitHub

Defined in ActiveSupport::ParameterFilter

Type at least 2 characters to search.

↑↓ navigate · open · esc close