refactor description controller

This commit is contained in:
Tanguy PATTE 2015-08-18 10:43:36 +02:00
parent 67a4ff2519
commit 0eb699d6b9
4 changed files with 89 additions and 85 deletions

View file

@ -6,8 +6,8 @@ class DescriptionController < ApplicationController
@array_id_pj_valides = PieceJointe.get_array_id_pj_valid_for_dossier @dossier.id
@formulaire = @dossier.formulaire
@liste_pieces_jointes = @dossier.types_piece_jointe
rescue
redirect_to url_for({controller: :start, action: :error_dossier})
rescue ActiveRecord::RecordNotFound
redirect_to url_for(controller: :start, action: :error_dossier)
end
def error