chore(rubocop): fix Rails/RedundantPresenceValidationOnBelongsTo

This commit is contained in:
Colin Darie 2023-04-19 11:58:18 +02:00
parent 6eec42135d
commit f4ad5289cd
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4

View file

@ -42,7 +42,6 @@ class Avis < ApplicationRecord
size: { less_than: FILE_MAX_SIZE }
validates :email, format: { with: Devise.email_regexp, message: "n'est pas valide" }, allow_nil: true
validates :claimant, presence: true
validates :question_answer, inclusion: { in: [true, false] }, on: :update, if: -> { question_label.present? }
validates :piece_justificative_file, size: { less_than: FILE_MAX_SIZE }
validates :introduction_file, size: { less_than: FILE_MAX_SIZE }