demarches-normaliennes/app/controllers/recapitulatif_controller.rb
Tanguy PATTE 3c57643f76 add database cleaner
add factory girl
fix tests
rename dossier_pdf into piece_jointe
rename ref_piece_jointe into content
2015-08-13 15:56:58 +02:00

16 lines
435 B
Ruby

class RecapitulatifController < ApplicationController
def show
@dossier = Dossier.find(params[:dossier_id])
@dossier = @dossier.decorate
#mettre dans le modèle
@commentaires = @dossier.commentaires.order(created_at: :desc)
@commentaires = @commentaires.all.decorate
@commentaire_email = @dossier.mail_contact
rescue => e
redirect_to url_for({controller: :start, action: :error_dossier})
end
end