aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/type.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/type.rb')
-rw-r--r--activemodel/lib/active_model/type.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/type.rb b/activemodel/lib/active_model/type.rb
index 095801d8f0..39324999c9 100644
--- a/activemodel/lib/active_model/type.rb
+++ b/activemodel/lib/active_model/type.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require "active_model/type/helpers"
require "active_model/type/value"
@@ -30,6 +32,10 @@ module ActiveModel
def lookup(*args, **kwargs) # :nodoc:
registry.lookup(*args, **kwargs)
end
+
+ def default_value # :nodoc:
+ @default_value ||= Value.new
+ end
end
register(:big_integer, Type::BigInteger)