ChampsService: add tests and refactor

This commit is contained in:
Simon Lehericey 2017-03-29 13:37:07 +02:00
parent c5159dde4b
commit 4df03fc28e
6 changed files with 119 additions and 23 deletions

View file

@ -5,7 +5,7 @@ class Backoffice::PrivateFormulairesController < ApplicationController
dossier = current_gestionnaire.dossiers.find(params[:dossier_id])
unless params[:champs].nil?
champs_service_errors = ChampsService.save_formulaire dossier.champs_private, params
champs_service_errors = ChampsService.save_champs dossier.champs_private, params
if champs_service_errors.empty?
flash[:notice] = "Formulaire enregistré"