validators: rename no_empty_repetitions to no_empty_repetition

This commit is contained in:
Pierre de La Morinerie 2021-11-30 12:23:46 +01:00
parent 115ca5e24a
commit e219ec33d8
2 changed files with 2 additions and 2 deletions

View file

@ -234,7 +234,7 @@ class Procedure < ApplicationRecord
validates :description, presence: true, allow_blank: false, allow_nil: false
validates :administrateurs, presence: true
validates :lien_site_web, presence: true, if: :publiee?
validates :draft_revision, 'revisions/no_empty_repetitions': true, if: :validate_for_publication?
validates :draft_revision, 'revisions/no_empty_repetition': true, if: :validate_for_publication?
validate :check_juridique
validates :path, presence: true, format: { with: /\A[a-z0-9_\-]{3,200}\z/ }, uniqueness: { scope: [:path, :closed_at, :hidden_at, :unpublished_at], case_sensitive: false }
validates :duree_conservation_dossiers_dans_ds, allow_nil: false, numericality: { only_integer: true, greater_than_or_equal_to: 1, less_than_or_equal_to: MAX_DUREE_CONSERVATION }

View file

@ -1,4 +1,4 @@
class Revisions::NoEmptyRepetitionsValidator < ActiveModel::EachValidator
class Revisions::NoEmptyRepetitionValidator < ActiveModel::EachValidator
def validate_each(procedure, attribute, revision)
return if revision.nil?