Merge pull request #42839 from jonathanhefner/doc-each_validator

Remove nodoc from EachValidator [ci-skip]
This commit is contained in:
Jonathan Hefner 2021-07-23 13:27:35 -05:00 committed by GitHub
commit baa070c3b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -129,7 +129,7 @@ module ActiveModel
# record, attribute and value.
#
# All \Active \Model validations are built on top of this validator.
class EachValidator < Validator #:nodoc:
class EachValidator < Validator
attr_reader :attributes
# Returns a new validator instance. All options will be available via the

View File

@ -1087,7 +1087,7 @@ end
```
The easiest way to add custom validators for validating individual attributes
is with the convenient `ActiveModel::EachValidator`. In this case, the custom
is with the convenient [`ActiveModel::EachValidator`][]. In this case, the custom
validator class must implement a `validate_each` method which takes three
arguments: record, attribute, and value. These correspond to the instance, the
attribute to be validated, and the value of the attribute in the passed
@ -1110,6 +1110,7 @@ end
As shown in the example, you can also combine standard validations with your
own custom validators.
[`ActiveModel::EachValidator`]: https://api.rubyonrails.org/classes/ActiveModel/EachValidator.html
[`ActiveModel::Validator`]: https://api.rubyonrails.org/classes/ActiveModel/Validator.html
### Custom Methods