demarches-normaliennes/app/controllers/users/procedure_controller.rb
Xavier J dd09a38bbb User can begin a new dossier with a procedure archived
Administrateur can see archived procedure
2015-11-27 10:39:05 +01:00

12 lines
377 B
Ruby

class Users::ProcedureController < UsersController
def index
@procedure = Procedure.where(archived: false).find(params[:procedure_id])
@siret = params[:siret] || current_user.siret
rescue ActiveRecord::RecordNotFound
error_procedure
end
def error_procedure
render :file => "#{Rails.root}/public/404_procedure_not_found.html", :status => 404
end
end