Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include reference to anonymised record in Anony::Result #112

Merged
merged 8 commits into from
Oct 14, 2024

Conversation

Tabby
Copy link
Contributor

@Tabby Tabby commented Oct 10, 2024

When using selectors to anonymise records, an array of Anony::Result objects is returned and these results now contain a reference to the record that was anonymised.

This means that it is significantly easier to match the changes from the fields on each result with the record that those changes came from in case the changes don't include any unique identifiers like the primary key field.

record parameter in Result factory methods has been left as an optional parameter to ensure that we don't break compatibility with downstream users who might have custom strategies that create results

Tabby added 2 commits October 11, 2024 16:30
When using selectors to anonymise records, an array of `Result` objects
is returned and these results now contain a reference to the record that
was anonymised.

This means that it is significantly easier to match the changes from the
`fields` on each result with the record that those changes came from in
case the changes don't include any unique identifiers like the primary
key field.
@Tabby Tabby force-pushed the add-record-to-result-for-selectors branch from a6365bc to b666b23 Compare October 11, 2024 15:31
lib/anony/result.rb Outdated Show resolved Hide resolved
Copy link
Contributor

@stephenbinns stephenbinns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small question but doesn't seem blocking

@Tabby Tabby merged commit 538e555 into master Oct 14, 2024
10 checks passed
@Tabby Tabby deleted the add-record-to-result-for-selectors branch October 14, 2024 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants