From 4862c2faf618ba8949a4c675d8eaa90a0ce09258 Mon Sep 17 00:00:00 2001 From: Jesse van der Pluijm Date: Thu, 16 Sep 2021 13:22:00 +0200 Subject: [PATCH] Fix typo: integer numbers (not integral) --- activemodel/lib/active_model/validations/numericality.rb | 2 +- guides/source/active_record_validations.md | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index b3da205507..c7871c4ed8 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -161,7 +161,7 @@ module ActiveModel # Configuration options: # * :message - A custom error message (default is: "is not a number"). # * :only_integer - Specifies whether the value has to be an - # integer, e.g. an integral value (default is +false+). + # integer (default is +false+). # * :allow_nil - Skip validation if attribute is +nil+ (default is # +false+). Notice that for Integer and Float columns empty strings are # converted to +nil+. diff --git a/guides/source/active_record_validations.md b/guides/source/active_record_validations.md index 84d19d7a08..d4c66117a5 100644 --- a/guides/source/active_record_validations.md +++ b/guides/source/active_record_validations.md @@ -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