From cdebf39e6ce88d5bd7eeea37281e5874edf34929 Mon Sep 17 00:00:00 2001 From: Alex Ghiculescu Date: Thu, 13 Jul 2023 16:30:22 +1000 Subject: [PATCH] Improve AR Encryption docs --- guides/source/active_record_encryption.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/guides/source/active_record_encryption.md b/guides/source/active_record_encryption.md index c960626ba49fc..b8915170db20c 100644 --- a/guides/source/active_record_encryption.md +++ b/guides/source/active_record_encryption.md @@ -260,13 +260,17 @@ end By default, encrypted columns are configured to be [automatically filtered in Rails logs](action_controller_overview.html#parameters-filtering). You can disable this behavior by adding the following to your `application.rb`: -When generating the filter parameter, it will use the model name as a prefix. E.g: For `Person#name` the filter parameter will be `person.name`. - ```ruby config.active_record.encryption.add_to_filter_parameters = false ``` -In case you want exclude specific columns from this automatic filtering, add them to `config.active_record.encryption.excluded_from_filter_parameters`. +If filtering is enabled, but you want to exclude specific columns from automatic filtering, add them to `config.active_record.encryption.excluded_from_filter_parameters`: + +```ruby +config.active_record.encryption.excluded_from_filter_parameters = [:catchphrase] +``` + +When generating the filter parameter, Rails will use the model name as a prefix. E.g: For `Person#name`, the filter parameter will be `person.name`. ### Encoding