class method
self.new
Ruby on Rails 8.0.4
Since v6.0.6Signature
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
-
filtersopt = [] -
maskkey = FILTERED
Source
# File activesupport/lib/active_support/parameter_filter.rb, line 77
def initialize(filters = [], mask: FILTERED)
@mask = mask
compile_filters!(filters)
end
Defined in activesupport/lib/active_support/parameter_filter.rb line 77
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveSupport::ParameterFilter