From 251bd635c23ceaf6ed918a96ae546b0d116d10d6 Mon Sep 17 00:00:00 2001 From: gregoirenovel Date: Thu, 22 Nov 2018 12:17:52 +0100 Subject: [PATCH] Prepare for champ_id deletion --- app/models/commentaire.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/app/models/commentaire.rb b/app/models/commentaire.rb index 86869f455..cfe068626 100644 --- a/app/models/commentaire.rb +++ b/app/models/commentaire.rb @@ -1,6 +1,5 @@ class Commentaire < ApplicationRecord belongs_to :dossier, touch: true - belongs_to :champ belongs_to :piece_justificative mount_uploader :file, CommentaireFileUploader @@ -13,6 +12,10 @@ class Commentaire < ApplicationRecord after_create :notify + def self.columns + super.reject { |c| c.name == "champ" } + end + def header "#{sender}, #{I18n.l(created_at, format: '%d %b %Y %H:%M')}" end