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

eliminate ActiveRecord as a dependency for errors #62

Merged
merged 1 commit into from
Apr 30, 2017

Conversation

SamMarkGoldman
Copy link
Contributor

if ActiveRecord is not loaded in your project, but the method jsonapi_render_errors is called, the code tries to see if the object passed in is an active record object or not. But in doing so, it assumed active record is loaded to make said comparison.

If active record is not loaded, now the active_record_obj? method in JSONAPI::Utils::Response::Formatters always fails, which is good.

Copy link
Owner

@tiagopog tiagopog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Although It's an unusual use case it's a good idea to make this check you've included. Thanks for contributing 👍

@tiagopog tiagopog merged commit 1bce9d6 into tiagopog:master Apr 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants