From 532fe466dfdee272f73309d635748d348ec1c12e Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Fri, 3 Nov 2023 10:15:46 +0000 Subject: [PATCH] refactor(conditional): use upper_coordinates method --- .../block_component/block_component.html.haml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/components/types_de_champ_editor/block_component/block_component.html.haml b/app/components/types_de_champ_editor/block_component/block_component.html.haml index 770b47671..388cbf6ff 100644 --- a/app/components/types_de_champ_editor/block_component/block_component.html.haml +++ b/app/components/types_de_champ_editor/block_component/block_component.html.haml @@ -1,3 +1,3 @@ %ul.types-de-champ-block{ id: block_id, data: sortable_options } - - @coordinates.each.with_index do |coordinate, i| - = render TypesDeChampEditor::ChampComponent.new(coordinate: coordinate, upper_coordinates: @upper_coordinates + @coordinates.take(i)) + - @coordinates.each do |coordinate| + = render TypesDeChampEditor::ChampComponent.new(coordinate: coordinate, upper_coordinates: coordinate.upper_coordinates)