refactor(champs): change views to use new urls with stable_id and row_id
This commit is contained in:
parent
6e71a20257
commit
bcd3f3b471
21 changed files with 104 additions and 36 deletions
|
@ -317,11 +317,12 @@ module Users
|
|||
|
||||
def champ
|
||||
@dossier = dossier_with_champs(pj_template: false)
|
||||
champ_id_or_stable_id = params[:stable_id]
|
||||
champ = if params[:with_public_id].present?
|
||||
type_de_champ = @dossier.find_type_de_champ_by_stable_id(params[:champ_id], :public)
|
||||
type_de_champ = @dossier.find_type_de_champ_by_stable_id(champ_id_or_stable_id, :public)
|
||||
@dossier.project_champ(type_de_champ, params[:row_id])
|
||||
else
|
||||
@dossier.champs_public_all.find(params[:champ_id])
|
||||
@dossier.champs_public_all.find(champ_id_or_stable_id)
|
||||
end
|
||||
|
||||
respond_to do |format|
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue