diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-05-24 05:30:26 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-05-27 05:42:45 -0700 |
commit | 6b46106d65c749d4eba304b753f9a70ede6ed5d9 (patch) | |
tree | 6bb4c4d823b5dc30445b2ce8c6ba948a2a5a685e /activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | |
parent | 7f1e5504ab3770aef51f55c7d32ebc699bd8947d (diff) | |
download | rails-6b46106d65c749d4eba304b753f9a70ede6ed5d9.tar.gz rails-6b46106d65c749d4eba304b753f9a70ede6ed5d9.tar.bz2 rails-6b46106d65c749d4eba304b753f9a70ede6ed5d9.zip |
Deprecate decimal columns being automatically treated as integers
With ActiveRecord::Properties, we now have a reasonable path for users
to continue to keep this behavior if they want it. This is an edge case
that has added a lot of complexity to the code base.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb index 1f327d1f2f..027169ae3c 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb @@ -478,6 +478,8 @@ module ActiveRecord # places after decimal = fmod - 4 & 0xffff # places before decimal = (fmod - 4) >> 16 & 0xffff if fmod && (fmod - 4 & 0xffff).zero? + # FIXME: Remove this class, and the second argument to + # lookups on PG Type::DecimalWithoutScale.new(precision: precision) else OID::Decimal.new(precision: precision, scale: scale) |