mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 17:48:39 +08:00

scopes are incredibly annoying to preload, simply adding :user_emails is not enough. Instead of relying on scopes simply iterate through user_emails which is properly preloaded. This removes 2 * N+1 when generating user reports.