refactor(champ): make row_id a named param
This commit is contained in:
parent
3556fcc11e
commit
10333908c3
21 changed files with 51 additions and 51 deletions
|
@ -17,7 +17,7 @@ class EditableChamp::SectionComponent < ApplicationComponent
|
|||
|
||||
def header_section
|
||||
node = @nodes.first
|
||||
@dossier.project_champ(node, @row_id) if node.is_a?(TypeDeChamp) && node.header_section?
|
||||
@dossier.project_champ(node, row_id: @row_id) if node.is_a?(TypeDeChamp) && node.header_section?
|
||||
end
|
||||
|
||||
def splitted_tail
|
||||
|
@ -40,7 +40,7 @@ class EditableChamp::SectionComponent < ApplicationComponent
|
|||
when EditableChamp::SectionComponent
|
||||
[node, nil]
|
||||
else
|
||||
[nil, @dossier.project_champ(node, @row_id)]
|
||||
[nil, @dossier.project_champ(node, row_id: @row_id)]
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -18,11 +18,11 @@ class ViewableChamp::SectionComponent < ApplicationComponent
|
|||
|
||||
def header_section
|
||||
node = @nodes.first
|
||||
@dossier.project_champ(node, @row_id) if node.is_a?(TypeDeChamp) && node.header_section?
|
||||
@dossier.project_champ(node, row_id: @row_id) if node.is_a?(TypeDeChamp) && node.header_section?
|
||||
end
|
||||
|
||||
def champs
|
||||
tail.filter_map { _1.is_a?(TypeDeChamp) ? @dossier.project_champ(_1, @row_id) : nil }
|
||||
tail.filter_map { _1.is_a?(TypeDeChamp) ? @dossier.project_champ(_1, row_id: @row_id) : nil }
|
||||
end
|
||||
|
||||
def sections
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue