add attachment when instructor asking for a review

This commit is contained in:
kara Diaby 2020-03-03 12:52:35 +01:00 committed by GitHub Action
parent cb811df94f
commit b32ed88f9b
6 changed files with 27 additions and 4 deletions

View file

@ -6,6 +6,7 @@ class Avis < ApplicationRecord
belongs_to :claimant, class_name: 'Instructeur'
has_one_attached :piece_justificative_file
has_one_attached :introduction_file
validates :email, format: { with: Devise.email_regexp, message: "n'est pas valide" }, allow_nil: true
validates :claimant, presence: true