From 1a92f4fb6574100fb9d16cf3f8e395c3a58938d6 Mon Sep 17 00:00:00 2001 From: Yves Senn Date: Wed, 21 May 2014 09:51:36 +0200 Subject: push `extract_scale` to the `Type`. - `extract_precision`, `extract_limit`, and `extract_default` probably need to follow. - would be good to remove the delegation `Column#extract_scale`. /cc @sgrif --- activerecord/lib/active_record/connection_adapters/type/value.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/lib/active_record/connection_adapters/type/value.rb') diff --git a/activerecord/lib/active_record/connection_adapters/type/value.rb b/activerecord/lib/active_record/connection_adapters/type/value.rb index 577e464553..289c27f6d4 100644 --- a/activerecord/lib/active_record/connection_adapters/type/value.rb +++ b/activerecord/lib/active_record/connection_adapters/type/value.rb @@ -4,6 +4,10 @@ module ActiveRecord class Value # :nodoc: def type; end + def extract_scale(sql_type) + Type.extract_scale(sql_type) + end + def type_cast(value) cast_value(value) unless value.nil? end -- cgit v1.2.3