aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/type
diff options
context:
space:
mode:
authorMariano Valles <mariano.valles@wooga.com>2014-07-16 16:23:54 +0200
committerMariano Valles <mariano.valles@wooga.com>2014-07-16 16:23:54 +0200
commit431b4b4d8881fce7bd937d7d9ff38afb1e3d8b4c (patch)
tree07b77666cbbd532b4b98c3e991647a78593592cf /activerecord/lib/active_record/type
parent7098c9083ccd08eb36cce5abcc99ad0506945ef0 (diff)
downloadrails-431b4b4d8881fce7bd937d7d9ff38afb1e3d8b4c.tar.gz
rails-431b4b4d8881fce7bd937d7d9ff38afb1e3d8b4c.tar.bz2
rails-431b4b4d8881fce7bd937d7d9ff38afb1e3d8b4c.zip
Fix case statement to use ::Numeric and ::String
Diffstat (limited to 'activerecord/lib/active_record/type')
-rw-r--r--activerecord/lib/active_record/type/decimal.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/type/decimal.rb b/activerecord/lib/active_record/type/decimal.rb
index 1c7edc12f5..31c465afdc 100644
--- a/activerecord/lib/active_record/type/decimal.rb
+++ b/activerecord/lib/active_record/type/decimal.rb
@@ -15,7 +15,7 @@ module ActiveRecord
def cast_value(value)
case value
- when Numeric, String, Rational
+ when ::Numeric, ::String
BigDecimal(value, precision.to_i)
when proc { value.respond_to?(:to_d) }
value.to_d