refactor(conditional): use upper_coordinates method

This commit is contained in:
Paul Chavard 2023-11-03 10:15:46 +00:00
parent 082558bb26
commit 532fe466df

View file

@ -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)