perf(admin_procedure_show): use partial with collection
This commit is contained in:
parent
e043725d51
commit
7af248b4bf
1 changed files with 3 additions and 2 deletions
|
@ -4,8 +4,9 @@
|
||||||
- else
|
- else
|
||||||
- changes.filter { |change| change[:model] == :attestation_template }.each do |change|
|
- changes.filter { |change| change[:model] == :attestation_template }.each do |change|
|
||||||
= render partial: 'administrateurs/procedures/revision_change_attestation_template', locals: { change: change }
|
= render partial: 'administrateurs/procedures/revision_change_attestation_template', locals: { change: change }
|
||||||
- changes.filter { |change| change[:model] == :type_de_champ }.each do |change|
|
= render partial: "administrateurs/procedures/revision_change_type_de_champ",
|
||||||
= render partial: 'administrateurs/procedures/revision_change_type_de_champ', locals: { change: change }
|
collection: changes.filter { |change| change[:model] == :type_de_champ },
|
||||||
|
as: :change
|
||||||
- move_changes, move_private_changes = changes.filter { |change| change[:op] == :move }.partition { |change| !change[:private] }
|
- move_changes, move_private_changes = changes.filter { |change| change[:op] == :move }.partition { |change| !change[:private] }
|
||||||
- if move_changes.present?
|
- if move_changes.present?
|
||||||
%li.mb-1= t(:move, scope: [:administrateurs, :revision_changes], count: move_changes.size)
|
%li.mb-1= t(:move, scope: [:administrateurs, :revision_changes], count: move_changes.size)
|
||||||
|
|
Loading…
Reference in a new issue