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

Defer code loading when active record is properly loaded #90

Closed
wants to merge 1 commit into from

Conversation

benoittgt
Copy link

This is well known issue. We should prefer to load code that reference active record only when it's AR is already loaded.
It can break other gems initializing process like thoughtbot/factory_bot_rails#432

Related:

Fix: #89

This is well known issue. We should prefer to code that reference active
record only when it's already lazy loaded.
It can break other gems initializing process

Related:
- rails/rails#46567
- paper-trail-gem/paper_trail@fc6c5f6
(inspiration)
- thoughtbot/factory_bot_rails#432

Fix: DatabaseCleaner#89
casperisfine added a commit to casperisfine/database_cleaner-active_record that referenced this pull request Nov 23, 2023
Doing this cause a slew of problems with Rails loading process, causing some configurations not to be applied, etc.

Fix: DatabaseCleaner#89
Fix: DatabaseCleaner#90
@benoittgt
Copy link
Author

Closing in favor of #91

@benoittgt benoittgt closed this Nov 23, 2023
@benoittgt benoittgt deleted the defer_loading branch November 23, 2023 11:01
etagwerker pushed a commit that referenced this pull request Nov 23, 2023
Doing this cause a slew of problems with Rails loading process, causing some configurations not to be applied, etc.

Fix: #89
Fix: #90
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.

Issue with the upcoming Factory Bot Rails due to lacking of lazy load hooks
1 participant