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

Pet: Refactor instance method to use the Match model instead of the AdopterApplication model #1021

Open
kasugaijin opened this issue Oct 2, 2024 · 0 comments
Labels
Ready Make a comment to get assigned.

Comments

@kasugaijin
Copy link
Collaborator

We have this instance method on Pet

def is_adopted?
adopter_applications.any? { |app| app.status == "adoption_made" }
end

The single source of truth on an adoption should be the Match model, where the match_type is adoption. Please update the method to query the pet's matches instead.

@kasugaijin kasugaijin added the Ready Make a comment to get assigned. label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready Make a comment to get assigned.
Projects
None yet
Development

No branches or pull requests

1 participant