palkan / n_plus_one_control

RSpec and Minitest matchers to prevent N+1 queries problem
MIT License
553 stars 20 forks source link

[question] Not support Mongoid now? #43

Closed xfyuan closed 3 years ago

xfyuan commented 3 years ago

n_plus_one_control not support mongoid now, right? Is there any plan to support it in future?

palkan commented 3 years ago

I'm not familiar with Mongoid.

Does it provides ActiveSupport Notifications events? If so, you can try setting NPlusOneControl.event = "query.mongoid" (or whatever) and see how this would work out.

We plan to adapterize the potential N+1 sources in the next major release; it would be great, if you help us with providing some insights on how Mongoid works.

xfyuan commented 3 years ago

got it