aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type/helpers/numeric.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/type/helpers/numeric.rb')
-rw-r--r--activemodel/lib/active_model/type/helpers/numeric.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/type/helpers/numeric.rb b/activemodel/lib/active_model/type/helpers/numeric.rb
index 473cdb0c67..444847a210 100644
--- a/activemodel/lib/active_model/type/helpers/numeric.rb
+++ b/activemodel/lib/active_model/type/helpers/numeric.rb
@@ -4,6 +4,10 @@ module ActiveModel
module Type
module Helpers # :nodoc: all
module Numeric
+ def serialize(value)
+ cast(value)
+ end
+
def cast(value)
value = \
case value