From e45e4f44e35d6ce9868542cc2a151b2a6c497e9b Mon Sep 17 00:00:00 2001 From: Sean Griffin Date: Wed, 21 May 2014 15:07:13 -0700 Subject: Move extract_scale to decimal type The only type that has a scale is decimal. There's a special case where decimal columns with 0 scale are type cast to integers if the scale is not specified. Appears to only affect schema dumping. --- activerecord/lib/active_record/connection_adapters/type/decimal.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters/type/decimal.rb') diff --git a/activerecord/lib/active_record/connection_adapters/type/decimal.rb b/activerecord/lib/active_record/connection_adapters/type/decimal.rb index ac5af4b963..a8cd1cf5b5 100644 --- a/activerecord/lib/active_record/connection_adapters/type/decimal.rb +++ b/activerecord/lib/active_record/connection_adapters/type/decimal.rb @@ -4,6 +4,8 @@ module ActiveRecord class Decimal < Value # :nodoc: include Numeric + delegate :extract_scale, to: Type + def type :decimal end -- cgit v1.2.3