demarches-normaliennes/app
Christophe Robillard 91f1722088 admin: always eager load the user relationship
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.
2020-02-04 16:21:42 +01:00
..
assets dossiers: fix the sticky bar on IE 11 2020-01-28 15:20:30 +01:00
controllers admin: replace calls to Administrateur.find_by(email: ...) 2020-02-04 16:21:42 +01:00
dashboards added a method for modifying a user email 2020-01-28 16:15:46 +01:00
fields manager: remove support for old pj 2019-07-30 16:11:17 +02:00
graphql [GraphQL] Use GraphQL::Types::BigInt instead of Int 2020-01-28 21:48:00 +01:00
helpers helpers: allow dossier_display_state to take a state as input 2019-12-19 13:22:40 +01:00
javascript Tweak a bit timeout values for export polling 2020-02-03 15:56:10 +01:00
jobs Fix typo in purges_stale_exports_job filename 2019-12-18 13:35:04 +01:00
lib Revert "Revert "Merge pull request #4552 from tchak/champ-communes"" 2020-01-14 18:46:07 +01:00
mailers Routing: send emails to the right group 2019-12-16 17:47:08 +01:00
models admin: always eager load the user relationship 2020-02-04 16:21:42 +01:00
policies champ_policy: allow instructeurs to access private annotations 2019-10-08 14:34:12 +02:00
serializers Cleanup demarche archivee state 2020-01-07 11:13:42 +01:00
services Bug with time zone: Time.zone.today looses time_zone and may breaks database comparisons 2019-12-11 17:34:10 +01:00
validators gestion des 2 formats de bouton monavis 2019-09-17 13:39:45 +02:00
views admin: alias Administrateur.email 2020-02-04 16:21:42 +01:00