Skip to content

Conversation

@alexsmartens
Copy link

Issue Description

The current implementation references ActiveRecord as soon as the gem is loaded, which triggers premature loading of Active Record. This can significantly slow down application boot time, especially in development and test environments.

Solution

Use Rails' recommended ActiveSupport.on_load(:active_record) hook to defer module inclusion until after ActiveRecord is fully loaded. This improves boot performance and avoids potential load order issues in edge cases.

…mproving booting performance and following Rails best practices
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