Skip to content

Commit

Permalink
Merge pull request #48728 from ghiculescu/patch-11
Browse files Browse the repository at this point in the history
Improve AR Encryption docs
  • Loading branch information
yahonda committed Jul 18, 2023
2 parents 835eb8a + cdebf39 commit 93453aa
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions guides/source/active_record_encryption.md
Expand Up @@ -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

Expand Down

0 comments on commit 93453aa

Please sign in to comment.