Remove unused code from Commentaire

This commit is contained in:
Paul Chavard 2019-06-25 16:37:24 +02:00
parent 3d2e6581f3
commit c5704fa22f
3 changed files with 1 additions and 9 deletions

View file

@ -1,6 +1,5 @@
class Commentaire < ApplicationRecord
belongs_to :dossier, inverse_of: :commentaires, touch: true
belongs_to :piece_justificative
belongs_to :user
belongs_to :gestionnaire

View file

@ -10,12 +10,7 @@
= commentaire_date(commentaire)
.rich-text= sanitize(simple_format(commentaire.body))
- if commentaire.piece_justificative
.attachment-link
= link_to commentaire.piece_justificative.content_url, class: "button", target: "_blank", rel: "noopener", title: "Télécharger" do
%span.icon.attachment
= commentaire.piece_justificative.original_filename
- elsif commentaire.file.present?
- if commentaire.file.present?
.attachment-link
= link_to commentaire.file_url, class: "button", target: "_blank", rel: "noopener", title: "Télécharger" do
%span.icon.attachment

View file

@ -7,8 +7,6 @@ describe Commentaire do
it { is_expected.to have_db_column(:updated_at) }
it { is_expected.to belong_to(:dossier) }
it { is_expected.to belong_to(:piece_justificative) }
describe "#notify" do
let(:procedure) { create(:procedure) }
let(:gestionnaire) { create(:gestionnaire) }