aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model.rb')
-rw-r--r--activemodel/lib/active_model.rb19
1 files changed, 15 insertions, 4 deletions
diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb
index ec2d734647..f757ba9843 100644
--- a/activemodel/lib/active_model.rb
+++ b/activemodel/lib/active_model.rb
@@ -34,10 +34,10 @@ module ActiveModel
autoload :Conversion
autoload :Dirty
autoload :EachValidator, 'active_model/validator'
- autoload :Errors
+ autoload :ForbiddenAttributesProtection
autoload :Lint
- autoload :MassAssignmentSecurity
autoload :Model
+ autoload :DeprecatedMassAssignmentSecurity
autoload :Name, 'active_model/naming'
autoload :Naming
autoload :Observer, 'active_model/observing'
@@ -49,11 +49,22 @@ module ActiveModel
autoload :Validations
autoload :Validator
+ eager_autoload do
+ autoload :Errors
+ end
+
module Serializers
extend ActiveSupport::Autoload
- autoload :JSON
- autoload :Xml
+ eager_autoload do
+ autoload :JSON
+ autoload :Xml
+ end
+ end
+
+ def eager_load!
+ super
+ ActiveModel::Serializer.eager_load!
end
end