aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
authorIain Beeston <iain.beeston@gmail.com>2016-10-03 14:06:11 +0100
committerIain Beeston <iain.beeston@gmail.com>2016-10-14 20:21:20 +0100
commit994ce87bbda7cc4b0059c951b06cdd15dc26cb97 (patch)
tree64da21f688868906bf1c6548606c4cab392de416 /activemodel/lib
parent159b774887cfb3d5c862b2b48d24d75b658e47af (diff)
downloadrails-994ce87bbda7cc4b0059c951b06cdd15dc26cb97.tar.gz
rails-994ce87bbda7cc4b0059c951b06cdd15dc26cb97.tar.bz2
rails-994ce87bbda7cc4b0059c951b06cdd15dc26cb97.zip
Moved database-specific ActiveModel types into ActiveRecord
ie. DecimalWithoutScale, Text and UnsignedInteger
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/type.rb4
-rw-r--r--activemodel/lib/active_model/type/decimal_without_scale.rb11
-rw-r--r--activemodel/lib/active_model/type/text.rb11
-rw-r--r--activemodel/lib/active_model/type/unsigned_integer.rb15
4 files changed, 0 insertions, 41 deletions
diff --git a/activemodel/lib/active_model/type.rb b/activemodel/lib/active_model/type.rb
index 313f17830f..a4e5a060f7 100644
--- a/activemodel/lib/active_model/type.rb
+++ b/activemodel/lib/active_model/type.rb
@@ -7,14 +7,11 @@ require "active_model/type/boolean"
require "active_model/type/date"
require "active_model/type/date_time"
require "active_model/type/decimal"
-require "active_model/type/decimal_without_scale"
require "active_model/type/float"
require "active_model/type/immutable_string"
require "active_model/type/integer"
require "active_model/type/string"
-require "active_model/type/text"
require "active_model/type/time"
-require "active_model/type/unsigned_integer"
require "active_model/type/registry"
@@ -53,7 +50,6 @@ module ActiveModel
register(:immutable_string, Type::ImmutableString)
register(:integer, Type::Integer)
register(:string, Type::String)
- register(:text, Type::Text)
register(:time, Type::Time)
end
end
diff --git a/activemodel/lib/active_model/type/decimal_without_scale.rb b/activemodel/lib/active_model/type/decimal_without_scale.rb
deleted file mode 100644
index 985e1038ed..0000000000
--- a/activemodel/lib/active_model/type/decimal_without_scale.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require "active_model/type/big_integer"
-
-module ActiveModel
- module Type
- class DecimalWithoutScale < BigInteger # :nodoc:
- def type
- :decimal
- end
- end
- end
-end
diff --git a/activemodel/lib/active_model/type/text.rb b/activemodel/lib/active_model/type/text.rb
deleted file mode 100644
index 7c0d647706..0000000000
--- a/activemodel/lib/active_model/type/text.rb
+++ /dev/null
@@ -1,11 +0,0 @@
-require "active_model/type/string"
-
-module ActiveModel
- module Type
- class Text < String # :nodoc:
- def type
- :text
- end
- end
- end
-end
diff --git a/activemodel/lib/active_model/type/unsigned_integer.rb b/activemodel/lib/active_model/type/unsigned_integer.rb
deleted file mode 100644
index 288fa23efe..0000000000
--- a/activemodel/lib/active_model/type/unsigned_integer.rb
+++ /dev/null
@@ -1,15 +0,0 @@
-module ActiveModel
- module Type
- class UnsignedInteger < Integer # :nodoc:
- private
-
- def max_value
- super * 2
- end
-
- def min_value
- 0
- end
- end
- end
-end