8b8213c301
Now that `Instructeur.email` is merely an alias to `instructeur.user.email`, and we changed every occurence of `instructeurs.pluck(:email)` to `instructeurs.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 Instructeur: - Instructeur and User have a strongly coupled relationship - It avoids N+1 queries everywhere in the app Of course fetching an instructeur 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 |