include type_de_champ

Avoid n+1 when matching champ.stable_id in procedure.presentation.displayed_fields_values
win 2s in the worst 3s scenario
This commit is contained in:
simon lehericey 2021-04-16 12:17:26 +02:00
parent f6c704d44d
commit e728a3fcb7

View file

@ -177,9 +177,9 @@ class ProcedurePresentation < ApplicationRecord
.map do |table| .map do |table|
case table case table
when 'type_de_champ' when 'type_de_champ'
:champs { champs: :type_de_champ }
when 'type_de_champ_private' when 'type_de_champ_private'
:champs_private { champs_private: :type_de_champ }
else else
table table
end end