Merge pull request #3043 from betagouv/prepare-deletion

Prepare for champ_id deletion
This commit is contained in:
gregoirenovel 2018-11-22 12:32:24 +01:00 committed by GitHub
commit e0cb8aef8e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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