Is there a way to specify keys of a hash in params to
filter_parameter_logging.
For example, my payment form sends creditcard[:number] and
creditcard[:type] in params and I filter these keys using
filter_parameter_logging :number, :type.
I don’t want :number and :type in other forms to be filtered. Is there
a way to solve this?
Is there a way to specify keys of a hash in params to
filter_parameter_logging.
For example, my payment form sends creditcard[:number] and
creditcard[:type] in params and I filter these keys using
filter_parameter_logging :number, :type.
I don’t want :number and :type in other forms to be filtered. Is there
a way to solve this?
thanks,
Ritesh
This condition is more advanced that filter_parameter_logging is
designed to handle. You’ll need to define your own filter_parameters
method for the controller. Here’s an example that may work for you: