perf(types_de_champs_controller): avoid n+1 query in select_champ_template_position_component

This commit is contained in:
Martin 2024-01-19 10:52:56 +01:00
parent 50d148d412
commit 4f0e247883

View file

@ -1,7 +1,7 @@
class TypesDeChampEditor::SelectChampTemplatePositionComponent < ApplicationComponent
def initialize(block:, coordinates:)
@block = block
@coordinates = coordinates
@coordinates = coordinates.includes(:type_de_champ)
end
def block_id