demarches-normaliennes/app/controllers/recapitulatif_controller.rb

17 lines
435 B
Ruby
Raw Normal View History

2015-08-10 11:05:06 +02:00
class RecapitulatifController < ApplicationController
def show
@dossier = Dossier.find(params[:dossier_id])
@dossier = @dossier.decorate
2015-08-11 15:22:07 +02:00
#mettre dans le modèle
2015-08-10 11:05:06 +02:00
@commentaires = @dossier.commentaires.order(created_at: :desc)
2015-08-10 11:05:06 +02:00
@commentaires = @commentaires.all.decorate
2015-08-10 11:05:06 +02:00
@commentaire_email = @dossier.mail_contact
rescue => e
2015-08-10 11:05:06 +02:00
redirect_to url_for({controller: :start, action: :error_dossier})
end
end