demarches-normaliennes/app/controllers/backoffice/dossiers/procedure_controller.rb

25 lines
574 B
Ruby
Raw Normal View History

class Backoffice::Dossiers::ProcedureController < Backoffice::DossiersListController
def index
super
dossiers_list_facade.service.filter_procedure! params[:id]
2016-11-23 15:21:42 +01:00
render 'backoffice/dossiers/index'
rescue ActiveRecord::RecordNotFound
2016-12-16 17:15:13 +01:00
flash.alert = "Cette procédure n'existe pas ou vous n'y avez pas accès."
redirect_to backoffice_dossiers_path
end
def filter
super
2016-12-16 17:15:13 +01:00
redirect_to backoffice_dossiers_procedure_path(id: params[:id])
end
private
def retrieve_procedure
current_gestionnaire.procedures.find params[:id]
end
end