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

Method Wrapping Exceptions #67

Merged
merged 7 commits into from
Feb 24, 2023
Merged

Conversation

egreer
Copy link
Contributor

@egreer egreer commented Feb 24, 2023

Safety check when trying to wrap a non existent method and allowing the model to continue to function. This occurs when a table has been migrated and has a new column defined so attribute_names says the attibute exists but the unwrapped_method doesn't exist in

self.class.send(:alias_method, unwrapped_method, method_name)

We are also raising explicit errors for extend_phi_access that try to access a non existant model as we want to continue to raise errors as early as possible instead of relying on the wrap_methods

…he model to continue to function.

raising explicit errors for extend_phi_access on a non existent model
@egreer egreer requested review from wkirby and HenryKeiter February 24, 2023 21:57
@egreer egreer merged commit 9c9f933 into main Feb 24, 2023
@egreer egreer deleted the feature/wrapping_non_existant_methods branch February 24, 2023 22:06
@egreer egreer mentioned this pull request Feb 25, 2023
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