diff options
author | Robert Eshleman <c.robert.eshleman@gmail.com> | 2015-12-22 16:01:50 -0500 |
---|---|---|
committer | Robert Eshleman <c.robert.eshleman@gmail.com> | 2015-12-22 16:01:50 -0500 |
commit | 57fb74e081005806f729cb7b03320f050fa6e67b (patch) | |
tree | 5dd32a37f9024a74126f72fa72b7682d3eeb4105 | |
parent | 9c330798b0a77762b72a833519e10b01738cf79c (diff) | |
download | rails-57fb74e081005806f729cb7b03320f050fa6e67b.tar.gz rails-57fb74e081005806f729cb7b03320f050fa6e67b.tar.bz2 rails-57fb74e081005806f729cb7b03320f050fa6e67b.zip |
Convert non-`Numeric` values to Floats
-rw-r--r-- | activemodel/lib/active_model/validations/numericality.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/validations/numericality.rb b/activemodel/lib/active_model/validations/numericality.rb index 176a111bcc..ad7012df48 100644 --- a/activemodel/lib/active_model/validations/numericality.rb +++ b/activemodel/lib/active_model/validations/numericality.rb @@ -39,7 +39,7 @@ module ActiveModel return end - if raw_value.is_a?(String) + unless raw_value.is_a?(Numeric) value = parse_raw_value_as_a_number(raw_value) end |