Remove unused code from Commentaire
This commit is contained in:
parent
3d2e6581f3
commit
c5704fa22f
3 changed files with 1 additions and 9 deletions
|
@ -1,6 +1,5 @@
|
||||||
class Commentaire < ApplicationRecord
|
class Commentaire < ApplicationRecord
|
||||||
belongs_to :dossier, inverse_of: :commentaires, touch: true
|
belongs_to :dossier, inverse_of: :commentaires, touch: true
|
||||||
belongs_to :piece_justificative
|
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :gestionnaire
|
belongs_to :gestionnaire
|
||||||
|
|
|
@ -10,12 +10,7 @@
|
||||||
= commentaire_date(commentaire)
|
= commentaire_date(commentaire)
|
||||||
.rich-text= sanitize(simple_format(commentaire.body))
|
.rich-text= sanitize(simple_format(commentaire.body))
|
||||||
|
|
||||||
- if commentaire.piece_justificative
|
- if commentaire.file.present?
|
||||||
.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?
|
|
||||||
.attachment-link
|
.attachment-link
|
||||||
= link_to commentaire.file_url, class: "button", target: "_blank", rel: "noopener", title: "Télécharger" do
|
= link_to commentaire.file_url, class: "button", target: "_blank", rel: "noopener", title: "Télécharger" do
|
||||||
%span.icon.attachment
|
%span.icon.attachment
|
||||||
|
|
|
@ -7,8 +7,6 @@ describe Commentaire do
|
||||||
it { is_expected.to have_db_column(:updated_at) }
|
it { is_expected.to have_db_column(:updated_at) }
|
||||||
it { is_expected.to belong_to(:dossier) }
|
it { is_expected.to belong_to(:dossier) }
|
||||||
|
|
||||||
it { is_expected.to belong_to(:piece_justificative) }
|
|
||||||
|
|
||||||
describe "#notify" do
|
describe "#notify" do
|
||||||
let(:procedure) { create(:procedure) }
|
let(:procedure) { create(:procedure) }
|
||||||
let(:gestionnaire) { create(:gestionnaire) }
|
let(:gestionnaire) { create(:gestionnaire) }
|
||||||
|
|
Loading…
Add table
Reference in a new issue