Class: GrapeLogging::Loggers::FilterParameters
- Defined in:
- lib/grape_logging/loggers/filter_parameters.rb
Constant Summary collapse
- AD_PARAMS =
'action_dispatch.request.parameters'.freeze
Instance Method Summary collapse
-
#initialize(filter_parameters = nil, replacement = nil, exceptions = %w(controller action format))) ⇒ FilterParameters
constructor
A new instance of FilterParameters.
- #parameters(request, _) ⇒ Object
Constructor Details
#initialize(filter_parameters = nil, replacement = nil, exceptions = %w(controller action format))) ⇒ FilterParameters
Returns a new instance of FilterParameters.
6 7 8 9 10 |
# File 'lib/grape_logging/loggers/filter_parameters.rb', line 6 def initialize(filter_parameters = nil, replacement = nil, exceptions = %w(controller action format)) @filter_parameters = filter_parameters || (defined?(::Rails.application) ? ::Rails.application.config.filter_parameters : []) @replacement = replacement || '[FILTERED]' @exceptions = exceptions end |
Instance Method Details
#parameters(request, _) ⇒ Object
12 13 14 |
# File 'lib/grape_logging/loggers/filter_parameters.rb', line 12 def parameters(request, _) { params: safe_parameters(request) } end |