From ace20bd25e3818b7f29c222643dd445c48b36425 Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 22 Dec 2009 17:27:37 -0600 Subject: Flip deferrable autoload convention --- activemodel/lib/active_model.rb | 42 ++++++++++++++++++++++------------------- 1 file changed, 23 insertions(+), 19 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index e0de27b96d..46caa53219 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -29,29 +29,33 @@ require 'active_support' module ActiveModel extend ActiveSupport::Autoload - autoload :AttributeMethods - autoload :Conversion - autoload :DeprecatedErrorMethods - autoload :Dirty - autoload :Errors - autoload :Lint - autoload :Name, 'active_model/naming' - autoload :Naming - autoload :Observer, 'active_model/observing' - autoload :Observing - autoload :Serialization - autoload :StateMachine - autoload :Translation - autoload :Validations - autoload :ValidationsRepairHelper - autoload :Validator - autoload :VERSION + eager_autoload do + autoload :AttributeMethods + autoload :Conversion + autoload :DeprecatedErrorMethods + autoload :Dirty + autoload :Errors + autoload :Lint + autoload :Name, 'active_model/naming' + autoload :Naming + autoload :Observer, 'active_model/observing' + autoload :Observing + autoload :Serialization + autoload :StateMachine + autoload :Translation + autoload :Validations + autoload :ValidationsRepairHelper + autoload :Validator + autoload :VERSION + end module Serializers extend ActiveSupport::Autoload - autoload :JSON - autoload :Xml + eager_autoload do + autoload :JSON + autoload :Xml + end end end -- cgit v1.2.3 From f737c2d69bb3659a553c7c0e21e316b1a4a1b98a Mon Sep 17 00:00:00 2001 From: Joshua Peek Date: Tue, 22 Dec 2009 17:39:41 -0600 Subject: All AMo modules are safe to defer --- activemodel/lib/active_model.rb | 42 +++++++++++++---------------- activemodel/lib/active_model/validations.rb | 1 + 2 files changed, 20 insertions(+), 23 deletions(-) (limited to 'activemodel') diff --git a/activemodel/lib/active_model.rb b/activemodel/lib/active_model.rb index 46caa53219..e0de27b96d 100644 --- a/activemodel/lib/active_model.rb +++ b/activemodel/lib/active_model.rb @@ -29,33 +29,29 @@ require 'active_support' module ActiveModel extend ActiveSupport::Autoload - eager_autoload do - autoload :AttributeMethods - autoload :Conversion - autoload :DeprecatedErrorMethods - autoload :Dirty - autoload :Errors - autoload :Lint - autoload :Name, 'active_model/naming' - autoload :Naming - autoload :Observer, 'active_model/observing' - autoload :Observing - autoload :Serialization - autoload :StateMachine - autoload :Translation - autoload :Validations - autoload :ValidationsRepairHelper - autoload :Validator - autoload :VERSION - end + autoload :AttributeMethods + autoload :Conversion + autoload :DeprecatedErrorMethods + autoload :Dirty + autoload :Errors + autoload :Lint + autoload :Name, 'active_model/naming' + autoload :Naming + autoload :Observer, 'active_model/observing' + autoload :Observing + autoload :Serialization + autoload :StateMachine + autoload :Translation + autoload :Validations + autoload :ValidationsRepairHelper + autoload :Validator + autoload :VERSION module Serializers extend ActiveSupport::Autoload - eager_autoload do - autoload :JSON - autoload :Xml - end + autoload :JSON + autoload :Xml end end diff --git a/activemodel/lib/active_model/validations.rb b/activemodel/lib/active_model/validations.rb index 064ec98f3a..a0d64507f9 100644 --- a/activemodel/lib/active_model/validations.rb +++ b/activemodel/lib/active_model/validations.rb @@ -1,5 +1,6 @@ require 'active_support/core_ext/array/extract_options' require 'active_support/core_ext/hash/keys' +require 'active_model/errors' module ActiveModel module Validations -- cgit v1.2.3