demarches-normaliennes/app
Pierre de La Morinerie 8b8213c301 instructeurs: always eager load the user relationship
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.
2019-11-04 10:44:24 +01:00
..
assets images: rename 'attachment' icon to 'attached' 2019-10-31 10:27:19 +01:00
controllers instructeurs: alias instructeur.email 2019-11-04 10:44:24 +01:00
dashboards Rename gestionnaire in code to instructeur 2019-08-12 13:47:01 +02:00
fields manager: remove support for old pj 2019-07-30 16:11:17 +02:00
graphql admin: relabel the number champ 2019-10-22 15:59:43 +02:00
helpers fix dossier_linked_path in routed procedure 2019-10-23 21:47:20 +02:00
javascript procedure: make the layout more similar to the mockup 2019-10-31 10:27:19 +01:00
jobs cleanup the queue flag during cleanup job 2019-10-24 16:27:10 +02:00
lib Revert "Revert "Decommission ActiveStorage proxy service and use openstack service"" 2019-10-30 12:11:45 +01:00
mailers instructeurs: alias instructeur.email 2019-11-04 10:44:24 +01:00
models instructeurs: always eager load the user relationship 2019-11-04 10:44:24 +01:00
policies champ_policy: allow instructeurs to access private annotations 2019-10-08 14:34:12 +02:00
serializers instructeurs: alias instructeur.email 2019-11-04 10:44:24 +01:00
services [fix #4361] administrateur active 2019-10-24 18:32:48 +02:00
validators gestion des 2 formats de bouton monavis 2019-09-17 13:39:45 +02:00
views Extend old export format till mid-November 2019-10-31 17:11:46 +01:00