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

Bullet not recognizing that calls to empty? on has_many association requires includes #148

Closed
garysweaver opened this Issue Mar 17, 2014 · 2 comments

Comments

Projects
None yet
2 participants
@garysweaver

garysweaver commented Mar 17, 2014

We've noticed in one case where Bullet thinks a query should not have an includes, but if we take it out, then calling empty? on the association generates another query, so the includes is required to avoid the additional query caused by empty?.

This is in Rails/ActiveRecord 4.0.2 with Bullet 4.0.8. Bullet is very helpful otherwise!

@flyerhzm

This comment has been minimized.

Show comment
Hide comment
@flyerhzm

flyerhzm Jun 22, 2014

Owner

@garysweaver it should be fixed, please try master branch.

Owner

flyerhzm commented Jun 22, 2014

@garysweaver it should be fixed, please try master branch.

@garysweaver

This comment has been minimized.

Show comment
Hide comment
@garysweaver

garysweaver commented Jun 22, 2014

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment