From 77fe251d8a2c0c028d9615eaa17d94cbf2e744de Mon Sep 17 00:00:00 2001 From: Xavier J Date: Tue, 11 Aug 2015 15:38:34 +0200 Subject: [PATCH] =?UTF-8?q?Suppression=20des=20decorates=20pour=20=C3=A9ta?= =?UTF-8?q?blissement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admin/dossier_controller.rb | 2 +- app/controllers/dossiers_controller.rb | 4 ++-- db/seeds.rb | 1 - 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/dossier_controller.rb b/app/controllers/admin/dossier_controller.rb index 417dc41f6..0c6fd1dd4 100644 --- a/app/controllers/admin/dossier_controller.rb +++ b/app/controllers/admin/dossier_controller.rb @@ -4,7 +4,7 @@ class Admin::DossierController < ApplicationController def show @dossier = Dossier.find(params[:dossier_id]) @entreprise = @dossier.entreprise.decorate - @etablissement = @dossier.etablissement.decorate + @etablissement = @dossier.etablissement @dossier_pdf = @dossier.dossier_pdf @commentaires = @dossier.commentaires.order(created_at: :desc) diff --git a/app/controllers/dossiers_controller.rb b/app/controllers/dossiers_controller.rb index 2d351d72a..707afdf8e 100644 --- a/app/controllers/dossiers_controller.rb +++ b/app/controllers/dossiers_controller.rb @@ -2,7 +2,7 @@ class DossiersController < ApplicationController def show @dossier = Dossier.find(params[:id]) - @etablissement = @dossier.etablissement.decorate + @etablissement = @dossier.etablissement @entreprise = @dossier.entreprise.decorate rescue redirect_to url_for({controller: :start, action: :error_dossier}) @@ -51,7 +51,7 @@ class DossiersController < ApplicationController if @dossier.autorisation_donnees redirect_to url_for({controller: :demandes, action: :show, dossier_id: @dossier.id}) else - @etablissement = @dossier.etablissement.decorate + @etablissement = @dossier.etablissement @entreprise = @dossier.entreprise.decorate self.error diff --git a/db/seeds.rb b/db/seeds.rb index b61feadb6..f14ca5a70 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -28,5 +28,4 @@ User.create({ @entreprise = Entreprise.create({id: 10000, siren: 431449040, date_creation: 1437665347, dossier: @dossier, raison_sociale: 'Coucou', code_effectif_entreprise: '00'}) @etablissement = Etablissement.create({id: 10000, siret: 43144904000028, siege_social: true, adresse: '50 avenue des champs élysées Paris 75008', entreprise: @entreprise, dossier: @dossier}) - Commentaire.create({email: 'test@test.com', body: 'Commentaire de test', dossier: @dossier}) \ No newline at end of file