Merge pull request #43226 from jessevdp/patch-1

Fix typo in Active Record validations guide, chapter 2 — integer numbers (not integral)

[ci-skip]
This commit is contained in:
Ryuta Kamizono 2021-09-19 23:30:26 +09:00 committed by GitHub
commit 6fa8151f33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -161,7 +161,7 @@ module ActiveModel
# Configuration options:
# * <tt>:message</tt> - A custom error message (default is: "is not a number").
# * <tt>:only_integer</tt> - Specifies whether the value has to be an
# integer, e.g. an integral value (default is +false+).
# integer (default is +false+).
# * <tt>:allow_nil</tt> - Skip validation if attribute is +nil+ (default is
# +false+). Notice that for Integer and Float columns empty strings are
# converted to +nil+.

View File

@ -518,10 +518,10 @@ custom message or call `presence` prior to `length`.
### `numericality`
This helper validates that your attributes have only numeric values. By
default, it will match an optional sign followed by an integral or floating
default, it will match an optional sign followed by an integer or floating
point number.
To specify that only integral numbers are allowed,
To specify that only integer numbers are allowed,
set `:only_integer` to true. Then it will use the
```ruby