aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-12-22 15:14:39 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-12-22 15:14:39 +0900
commit866ee17a1f774178d6428f766825d709626c08e5 (patch)
treec43a41cfc720a4c90719662fa86b8dfa07e18d4a /activerecord/test
parentb61227be8df371b76697f48e3fd63b70683dcef4 (diff)
downloadrails-866ee17a1f774178d6428f766825d709626c08e5.tar.gz
rails-866ee17a1f774178d6428f766825d709626c08e5.tar.bz2
rails-866ee17a1f774178d6428f766825d709626c08e5.zip
Restore the override of numeric attributes properly
`attribute :world_population, :integer` is not a same with default decimal without scale type unless #26302 is merged. Should be `attribute :world_population, :big_integer` for now.
Diffstat (limited to 'activerecord/test')
-rw-r--r--activerecord/test/models/numeric_data.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/test/models/numeric_data.rb b/activerecord/test/models/numeric_data.rb
index 9d2fe9781d..c6e025a9ce 100644
--- a/activerecord/test/models/numeric_data.rb
+++ b/activerecord/test/models/numeric_data.rb
@@ -1,3 +1,8 @@
class NumericData < ActiveRecord::Base
self.table_name = "numeric_data"
+ # Decimal columns with 0 scale being automatically treated as integers
+ # is deprecated, and will be removed in a future version of Rails.
+ attribute :world_population, :big_integer
+ attribute :my_house_population, :big_integer
+ attribute :atoms_in_universe, :big_integer
end