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

Fix NoMethodError when calling selector methods w/o anony config #113

Merged
merged 2 commits into from
Oct 11, 2024

Conversation

Tabby
Copy link
Contributor

@Tabby Tabby commented Oct 11, 2024

When calling selector_for? or anonymise_for! on a model with no anonymise block, instead of throwing a NoMethodError due to the anonymisation config being nil we now do the following:

  • Return false when calling selector_for?, same as if calling valid_anonymisation?
  • Raise ArgumentError when calling anonymise_for!, same as if calling anonymise!

@Tabby Tabby changed the title Fix NoMethodError when calling selector_for? on model with no config Fix NoMethodError when calling selector methods w/o anony config Oct 11, 2024
@Tabby Tabby merged commit 1ea0b29 into master Oct 11, 2024
10 checks passed
@Tabby Tabby deleted the fix-selector-for-when-no-anonymise-config branch October 11, 2024 15:30
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.

1 participant