DescriptionController: remove useless code

This commit is contained in:
Simon Lehericey 2017-03-29 15:35:55 +02:00
parent c4e128a506
commit 3a9065e4c1

View file

@ -37,13 +37,6 @@ class Users::DescriptionController < UsersController
check_mandatory_fields = true check_mandatory_fields = true
check_mandatory_fields = !(params[:submit].keys.first == 'brouillon') unless params[:submit].nil? check_mandatory_fields = !(params[:submit].keys.first == 'brouillon') unless params[:submit].nil?
unless @dossier.update_attributes(create_params)
@dossier = @dossier.decorate
flash.alert = @dossier.errors.full_messages.join('<br />').html_safe
return redirect_to users_dossier_description_path(dossier_id: @dossier.id)
end
if params[:champs] if params[:champs]
champs_service_errors = ChampsService.save_champs @dossier.champs, champs_service_errors = ChampsService.save_champs @dossier.champs,
params, params,
@ -139,9 +132,4 @@ class Users::DescriptionController < UsersController
redirect_to url_for(users_dossier_path(@dossier.id)) redirect_to url_for(users_dossier_path(@dossier.id))
end end
end end
def create_params
params.permit()
end
end end