validators: rename no_empty_repetitions to no_empty_repetition
This commit is contained in:
parent
115ca5e24a
commit
e219ec33d8
2 changed files with 2 additions and 2 deletions
|
@ -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 }
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
class Revisions::NoEmptyRepetitionsValidator < ActiveModel::EachValidator
|
||||
class Revisions::NoEmptyRepetitionValidator < ActiveModel::EachValidator
|
||||
def validate_each(procedure, attribute, revision)
|
||||
return if revision.nil?
|
||||
|
Loading…
Reference in a new issue