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

Verify that ActiveRecord::Base is defined when checking for support #312

Merged

Conversation

Projects
None yet
2 participants
@qnm
Copy link
Contributor

commented May 2, 2019

Some gems will create an ActiveRecord module, but if you
aren't using already using AR you won't have AR::Base loaded.

The previous check would throw an exception in that scenrio.

I've modified the check to detect that ActiveRecord::Base is also defined.

Verify that ActiveRecord::Base is defined before use
Some gems will create an ActiveRecord module, but if you
aren't using AR you won't have AR::Base loaded. The check breaks
in this case.

@paulelliott paulelliott merged commit 6d5e6ed into paulelliott:master May 2, 2019

@paulelliott

This comment has been minimized.

Copy link
Owner

commented May 2, 2019

Nice catch! Thanks!

@paulelliott

This comment has been minimized.

Copy link
Owner

commented May 2, 2019

Just pushed version 2.20.2 with this fix.

@qnm qnm deleted the qnm:check-ar-base-defined-before-use branch May 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.