Merge pull request #3992 from tchak/remove-old-comment-pj

Remove unused code from Commentaire
This commit is contained in:
LeSim 2019-06-25 17:28:36 +02:00 committed by GitHub
commit f10e79ab4e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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) }