Skip to content
This repository
Browse code

validates_numericality_of() "integer" option really is "only_integer"

  • Loading branch information...
commit 9482da621390c874da7c921c8bd6230caae7035a 1 parent e9afd67
Sunny Ripert authored
4  activerecord/lib/active_record/validations.rb
@@ -802,8 +802,8 @@ def validates_associated(*attr_names)
802 802
       end
803 803
 
804 804
       # Validates whether the value of the specified attribute is numeric by trying to convert it to
805  
-      # a float with Kernel.Float (if <tt>integer</tt> is false) or applying it to the regular expression
806  
-      # <tt>/\A[\+\-]?\d+\Z/</tt> (if <tt>integer</tt> is set to true).
  805
+      # a float with Kernel.Float (if <tt>only_integer</tt> is false) or applying it to the regular expression
  806
+      # <tt>/\A[\+\-]?\d+\Z/</tt> (if <tt>only_integer</tt> is set to true).
807 807
       #
808 808
       #   class Person < ActiveRecord::Base
809 809
       #     validates_numericality_of :value, :on => :create

0 notes on commit 9482da6

Please sign in to comment.
Something went wrong with that request. Please try again.