aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord')
-rwxr-xr-xactiverecord/lib/active_record/validations.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/validations.rb b/activerecord/lib/active_record/validations.rb
index 38b2f38a3d..25eecaf49f 100755
--- a/activerecord/lib/active_record/validations.rb
+++ b/activerecord/lib/active_record/validations.rb
@@ -877,7 +877,7 @@ module ActiveRecord
raw_value = raw_value.to_i
else
begin
- raw_value = Kernel.Float(raw_value.to_s)
+ raw_value = Kernel.Float(raw_value)
rescue ArgumentError, TypeError
message = record.errors.generate_message(attr_name, :not_a_number, :value => raw_value, :default => configuration[:message])
record.errors.add(attr_name, message)