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

Use ActiveSupport.on_load to inject modules #346

Merged

Conversation

jhawthorn
Copy link
Contributor

@jhawthorn jhawthorn commented Jul 14, 2016

This solves a load order issue where routes were not loaded in tests due to ActionView being referenced here before it was fully loaded.

The rails documentation seems to recommends using these hooks, so I have changed the injection into ActiveRecord::Base to use it as well instead of requiring active_record.

See also rails/rails-controller-testing#24 especially this comment for additional details.

This solves a load order issue where routes were not loaded in tests due
to ActionView being referenced here before it was fully loaded.

The rails documentation seems to recommends using these hooks, so I have
changed active_record to use it as well instead of requiring
active_record.
@jhawthorn
Copy link
Contributor Author

@danielmorrison sorry for the ping, but is there anything I can do to move this forward? This issue prevents me from upgrading solidus to rails 5

@danielmorrison danielmorrison merged commit 76bfb77 into collectiveidea:master Aug 12, 2016
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