fixed ArgumentError

This commit is contained in:
dinsmol 2021-09-03 16:12:16 +03:00
parent c771902780
commit 62d1ba45a2
8 changed files with 10 additions and 12 deletions

View file

@ -7,6 +7,6 @@ class DomainNameserverValidator < ActiveModel::EachValidator
return if values.size.between?(min, max)
association = options[:association] || attribute
record.errors.add(association, :out_of_range, { min: min, max: max })
record.errors.add(association, :out_of_range, **{ min: min, max: max })
end
end

View file

@ -5,6 +5,6 @@ class ObjectCountValidator < ActiveModel::EachValidator
return if values.size.between?(min, max)
association = options[:association] || attribute
record.errors.add(association, :out_of_range, { min: min, max: max })
record.errors.add(association, :out_of_range, **{ min: min, max: max })
end
end