Open firebelly opened 14 years ago
+1, but seems to be a bit complicated to do this, since rails will call the query only when it's needed(and often it only happen in the view)
Correct me if I'm wrong, but Isn't this feature already present? If you enable the bullet logger, it will log the line number of the view template where the possible N+1 query happens.
this is impossible on a technical level AFAIK because Ruby doesn't keep a record (line of code) of where an Arel was first created.
Is there anyway Bullet could output the line number of the finder that needs to be modified? I've taken over a convoluted app, and am actually having trouble finding the finders Bullet is telling me to modify.