From b045bfa8798b4807c1199ccbe1c6c58b87c5eafb Mon Sep 17 00:00:00 2001 From: Adam Meehan Date: Wed, 28 Jul 2010 09:34:26 +1000 Subject: [PATCH] remove ineffectual line in numericality validator --- .../lib/active_model/validations/numericality.rb | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index b6aff7a..4aa0266 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -27,8 +27,6 @@ module ActiveModel raw_value = record.send("#{attr_name}_before_type_cast") if record.respond_to?(before_type_cast.to_sym) raw_value ||= value - return if options[:allow_nil] && raw_value.nil? - unless value = parse_raw_value_as_a_number(raw_value) record.errors.add(attr_name, :not_a_number, filtered_options(raw_value)) return -- 1.6.5