diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-21 15:07:13 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-21 15:07:29 -0700 |
commit | e45e4f44e35d6ce9868542cc2a151b2a6c497e9b (patch) | |
tree | b68cf8fc46a61a79acee62d5ba96feb97c500ad7 /activerecord/lib/active_record/connection_adapters/type/value.rb | |
parent | b042f21c93959e0247d447f37644815bdc6d5851 (diff) | |
download | rails-e45e4f44e35d6ce9868542cc2a151b2a6c497e9b.tar.gz rails-e45e4f44e35d6ce9868542cc2a151b2a6c497e9b.tar.bz2 rails-e45e4f44e35d6ce9868542cc2a151b2a6c497e9b.zip |
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.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/type/value.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/type/value.rb | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/type/value.rb b/activerecord/lib/active_record/connection_adapters/type/value.rb index 289c27f6d4..52d9ed9bc0 100644 --- a/activerecord/lib/active_record/connection_adapters/type/value.rb +++ b/activerecord/lib/active_record/connection_adapters/type/value.rb @@ -3,10 +3,7 @@ module ActiveRecord module Type class Value # :nodoc: def type; end - - def extract_scale(sql_type) - Type.extract_scale(sql_type) - end + def extract_scale(sql_type); end def type_cast(value) cast_value(value) unless value.nil? |