Merge pull request #3992 from tchak/remove-old-comment-pj
Remove unused code from Commentaire
This commit is contained in:
commit
f10e79ab4e
3 changed files with 1 additions and 9 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) }
|
||||
|
|
Loading…
Reference in a new issue