aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type/big_integer.rb
diff options
context:
space:
mode:
authorKir Shatrov <shatrov@me.com>2015-09-07 21:20:15 +0300
committerSean Griffin <sean@seantheprogrammer.com>2015-09-21 10:12:13 -0600
commit9cc8c6f3730df3d94c81a55be9ee1b7b4ffd29f6 (patch)
tree68a48d84f3d2e1902d94316f781c4aee60a5f798 /activemodel/lib/active_model/type/big_integer.rb
parentb223d729d823dcf3c6915daa2bf48c028718c465 (diff)
downloadrails-9cc8c6f3730df3d94c81a55be9ee1b7b4ffd29f6.tar.gz
rails-9cc8c6f3730df3d94c81a55be9ee1b7b4ffd29f6.tar.bz2
rails-9cc8c6f3730df3d94c81a55be9ee1b7b4ffd29f6.zip
Move ActiveRecord::Type to ActiveModel
The first step of bringing typecasting to ActiveModel
Diffstat (limited to 'activemodel/lib/active_model/type/big_integer.rb')
-rw-r--r--activemodel/lib/active_model/type/big_integer.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/type/big_integer.rb b/activemodel/lib/active_model/type/big_integer.rb
new file mode 100644
index 0000000000..4168cbfce7
--- /dev/null
+++ b/activemodel/lib/active_model/type/big_integer.rb
@@ -0,0 +1,13 @@
+require 'active_model/type/integer'
+
+module ActiveModel
+ module Type
+ class BigInteger < Integer # :nodoc:
+ private
+
+ def max_value
+ ::Float::INFINITY
+ end
+ end
+ end
+end