Only rename logo param if it is present

This commit is contained in:
Paul Chavard 2019-08-28 10:41:30 +02:00
parent 686e035431
commit 64dccbab5c

View file

@ -286,7 +286,9 @@ class Admin::ProceduresController < AdminController
else else
params.require(:procedure).permit(*editable_params, :duree_conservation_dossiers_dans_ds, :duree_conservation_dossiers_hors_ds, :for_individual, :path) params.require(:procedure).permit(*editable_params, :duree_conservation_dossiers_dans_ds, :duree_conservation_dossiers_hors_ds, :for_individual, :path)
end end
permited_params[:logo_active_storage] = permited_params.delete(:logo) if permited_params[:logo]
permited_params[:logo_active_storage] = permited_params.delete(:logo)
end
permited_params permited_params
end end
end end