91f1722088
Now that `Administrateur.email` is merely an alias to `administrateur.user.email`, and we changed every occurence of `administrateurs.pluck(:email)` to `administrateurs.map(&:email)`, the new version using `map` may cause N+1 queries if the users have not been preloaded. It makes sense to always preload the user when fetching an Administrateur: - Administrateur and User have a strongly coupled relationship - It avoids N+1 queries everywhere in the app Of course fetching an administrateur without needing its user will now do an unecessary fetch of the associated user. But it seems better than leaving a risk of N+1 queries in many places. |
||
---|---|---|
.. | ||
assets | ||
controllers | ||
dashboards | ||
fields | ||
graphql | ||
helpers | ||
javascript | ||
jobs | ||
lib | ||
mailers | ||
models | ||
policies | ||
serializers | ||
services | ||
validators | ||
views |