2015-08-10 11:05:06 +02:00
|
|
|
class RecapitulatifController < ApplicationController
|
|
|
|
def show
|
|
|
|
@dossier = Dossier.find(params[:dossier_id])
|
|
|
|
@dossier = @dossier.decorate
|
|
|
|
|
2015-08-20 16:39:36 +02:00
|
|
|
# mettre dans le modele
|
2015-08-10 11:05:06 +02:00
|
|
|
@commentaires = @dossier.commentaires.order(created_at: :desc)
|
2015-08-13 15:55:19 +02:00
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
@commentaires = @commentaires.all.decorate
|
2015-08-13 15:55:19 +02:00
|
|
|
|
2015-08-10 11:05:06 +02:00
|
|
|
@commentaire_email = @dossier.mail_contact
|
2015-08-25 10:49:28 +02:00
|
|
|
rescue ActiveRecord::RecordNotFound
|
2015-08-20 16:39:36 +02:00
|
|
|
redirect_to url_for(controller: :start, action: :error_dossier)
|
2015-08-10 11:05:06 +02:00
|
|
|
end
|
|
|
|
end
|