From 307d7338e55d5a48811cc208e3d6bb643ef34927 Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Tue, 16 Jan 2018 14:15:37 +0100 Subject: [PATCH] Remove unreachable code --- app/controllers/commentaires_controller.rb | 12 ------------ app/views/users/commentaires/index.html.haml | 1 - config/routes.rb | 1 - 3 files changed, 14 deletions(-) delete mode 100644 app/views/users/commentaires/index.html.haml diff --git a/app/controllers/commentaires_controller.rb b/app/controllers/commentaires_controller.rb index d9a9d88c6..af77f59d0 100644 --- a/app/controllers/commentaires_controller.rb +++ b/app/controllers/commentaires_controller.rb @@ -1,16 +1,4 @@ class CommentairesController < ApplicationController - def index - @facade = DossierFacades.new( - params[:dossier_id], - (current_gestionnaire || current_user).email, - params[:champs_id] - ) - render layout: false - rescue ActiveRecord::RecordNotFound - flash.alert = t('errors.messages.dossier_not_found') - redirect_to url_for(controller: '/') - end - def create @commentaire = Commentaire.new @commentaire.champ = @commentaire.dossier.champs.find(params[:champ_id]) if params[:champ_id] diff --git a/app/views/users/commentaires/index.html.haml b/app/views/users/commentaires/index.html.haml deleted file mode 100644 index a764a3e90..000000000 --- a/app/views/users/commentaires/index.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render partial: '/users/recapitulatif/commentaires_flux' diff --git a/config/routes.rb b/config/routes.rb index bf95f287d..1f19a32d7 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -86,7 +86,6 @@ Rails.application.routes.draw do post '/recapitulatif/initiate' => 'recapitulatif#initiate' post '/commentaire' => 'commentaires#create' - resources :commentaires, only: [:index] get '/carte/position' => 'carte#get_position' post '/carte/qp' => 'carte#get_qp'