From 994ce87bbda7cc4b0059c951b06cdd15dc26cb97 Mon Sep 17 00:00:00 2001 From: Iain Beeston Date: Mon, 3 Oct 2016 14:06:11 +0100 Subject: Moved database-specific ActiveModel types into ActiveRecord ie. DecimalWithoutScale, Text and UnsignedInteger --- .../lib/active_model/type/decimal_without_scale.rb | 11 ----------- activemodel/lib/active_model/type/text.rb | 11 ----------- activemodel/lib/active_model/type/unsigned_integer.rb | 15 --------------- 3 files changed, 37 deletions(-) delete mode 100644 activemodel/lib/active_model/type/decimal_without_scale.rb delete mode 100644 activemodel/lib/active_model/type/text.rb delete mode 100644 activemodel/lib/active_model/type/unsigned_integer.rb (limited to 'activemodel/lib/active_model/type') 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 -- cgit v1.2.3