Kill N+1 Queries with Bullet Gem
I'm notorious amongst our team for forgetting to eager load. One of the best little gems I've come across to help me remember is Bullet.(https://github.com/flyerhzm/bullet)
It will let you know (via Javascript alerts or, if you prefer, a logger) if it finds an N+1 query, or if it finds you are eager loading if you shouldn't be.
It's quite helpful (and more importantly, hard to ignore) in development. It's loud, and I like it.
Written by Jarrett Green
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Rails
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#