diff options
Diffstat (limited to 'activemodel/lib/active_model/validations/numericality.rb')
-rw-r--r-- | activemodel/lib/active_model/validations/numericality.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index ffd045a8fb..744c196d30 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -1,6 +1,5 @@ module ActiveModel - # == Active \Model Numericality \Validator module Validations class NumericalityValidator < EachValidator # :nodoc: CHECKS = { :greater_than => :>, :greater_than_or_equal_to => :>=, @@ -126,7 +125,7 @@ module ActiveModel # For example: # # class Person < ActiveRecord::Base - # validates_numericality_of :width, less_than: Proc.new { |person| person.height } + # validates_numericality_of :width, less_than: ->(person) { person.height } # validates_numericality_of :width, greater_than: :minimum_weight # end def validates_numericality_of(*attr_names) |