refactor(champs): change views to use new urls with stable_id and row_id

This commit is contained in:
Paul Chavard 2024-04-22 10:47:47 +02:00
parent 6e71a20257
commit bcd3f3b471
21 changed files with 104 additions and 36 deletions

View file

@ -1,5 +1,13 @@
class EditableChamp::RNAComponent < EditableChamp::EditableChampBaseComponent
def dsfr_input_classname
'fr-input'
end
def update_path
if Champ.update_by_stable_id?
champs_rna_path(@champ.dossier, @champ.stable_id, row_id: @champ.row_id)
else
champs_legacy_rna_path(@champ)
end
end
end