From 3521db70cebfc1a99a035af46ab7ee29da42a4d5 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Mon, 5 May 2008 22:50:48 +0200 Subject: [PATCH] revised list conventions in AM's numericality.rb --- .../active_model/validations/numericality.rb | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index 8f5c5e8df8..92ca5f4082 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -15,17 +15,17 @@ module ActiveModel # end # # Configuration options: - # * :message - A custom error message (default is: "is not a number") - # * :on Specifies when this validation is active (default is :save, other options :create, :update) - # * :only_integer Specifies whether the value has to be an integer, e.g. an integral value (default is +false+) - # * :allow_nil Skip validation if attribute is +nil+ (default is +false+). Notice that for fixnum and float columns empty strings are converted to +nil+ - # * :greater_than Specifies the value must be greater than the supplied value - # * :greater_than_or_equal_to Specifies the value must be greater than or equal the supplied value - # * :equal_to Specifies the value must be equal to the supplied value - # * :less_than Specifies the value must be less than the supplied value - # * :less_than_or_equal_to Specifies the value must be less than or equal the supplied value - # * :odd Specifies the value must be an odd number - # * :even Specifies the value must be an even number + # * :message - A custom error message (default is: "is not a number"). + # * :on - Specifies when this validation is active (default is :save, other options :create, :update). + # * :only_integer - Specifies whether the value has to be an integer, e.g. an integral value (default is +false+). + # * :allow_nil - Skip validation if attribute is +nil+ (default is +false+). Notice that for fixnum and float columns empty strings are converted to +nil+. + # * :greater_than - Specifies the value must be greater than the supplied value. + # * :greater_than_or_equal_to - Specifies the value must be greater than or equal the supplied value. + # * :equal_to - Specifies the value must be equal to the supplied value. + # * :less_than - Specifies the value must be less than the supplied value. + # * :less_than_or_equal_to - Specifies the value must be less than or equal the supplied value. + # * :odd - Specifies the value must be an odd number. + # * :even - Specifies the value must be an even number. # * :if - Specifies a method, proc or string to call to determine if the validation should # occur (e.g. :if => :allow_validation, or :if => Proc.new { |user| user.signup_step > 2 }). The # method, proc or string should return or evaluate to a true or false value.