Remove N+1 query on Dossier#show

This commit is contained in:
Mathieu Magnin 2017-12-01 17:01:43 +01:00
parent 7203dead28
commit 9bc5545bdd

View file

@ -12,7 +12,7 @@
= render partial: "identite_individual", locals: { individual: @dossier.individual }
.accompagnateur-title Formulaire
- champs = @dossier.ordered_champs.decorate
- champs = @dossier.ordered_champs.includes(:type_de_champ).decorate
- if champs.any?
.card
= render partial: "champs", locals: { champs: champs }