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

Explicitly load descendants patch in ActiveSupport #924

Merged
merged 1 commit into from May 5, 2022

Conversation

KaanOzkan
Copy link
Contributor

Motivation

Resolves #517

We utilize Class#descendants in tapioca. As reported in the above issue in Rails versions prior to v6.1.0, upon loading of a Rails::Engine the Class redefinition that defines descendants isn't loaded.

Implementation

Explicitly load the file using our internal safe_require method.

Tests

I tested it manually. Automated testing is likely not worth the effort in comparison to the change.

@KaanOzkan KaanOzkan requested a review from a team May 5, 2022 15:01
@KaanOzkan KaanOzkan merged commit ef8cb9f into main May 5, 2022
@KaanOzkan KaanOzkan deleted the ko/load-descendants-patch branch May 5, 2022 16:28
@paracycle paracycle added the backported Backported to stable branch label Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported Backported to stable branch bugfix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Descendants doesn't load for engines
2 participants