From f936a1f100e75082081e782e5cceb272885c2df7 Mon Sep 17 00:00:00 2001 From: Eric Chapweske Date: Sat, 17 Oct 2009 12:37:15 -0500 Subject: Refactoring attributes/types [#3348 state:resolved] Signed-off-by: Joshua Peek --- activerecord/lib/active_record.rb | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 2d66fa9fcb..8f118a6057 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -51,6 +51,7 @@ module ActiveRecord autoload :AssociationPreload, 'active_record/association_preload' autoload :Associations, 'active_record/associations' autoload :AttributeMethods, 'active_record/attribute_methods' + autoload :Attributes, 'active_record/attributes' autoload :AutosaveAssociation, 'active_record/autosave_association' autoload :Relation, 'active_record/relation' autoload :Base, 'active_record/base' @@ -74,6 +75,7 @@ module ActiveRecord autoload :TestCase, 'active_record/test_case' autoload :Timestamp, 'active_record/timestamp' autoload :Transactions, 'active_record/transactions' + autoload :Types, 'active_record/types' autoload :Validator, 'active_record/validator' autoload :Validations, 'active_record/validations' @@ -87,6 +89,20 @@ module ActiveRecord autoload :Write, 'active_record/attribute_methods/write' end + module Attributes + autoload :Aliasing, 'active_record/attributes/aliasing' + autoload :Store, 'active_record/attributes/store' + autoload :Typecasting, 'active_record/attributes/typecasting' + end + + module Type + autoload :Number, 'active_record/types/number' + autoload :Object, 'active_record/types/object' + autoload :Serialize, 'active_record/types/serialize' + autoload :TimeWithZone, 'active_record/types/time_with_zone' + autoload :Unknown, 'active_record/types/unknown' + end + module Locking autoload :Optimistic, 'active_record/locking/optimistic' autoload :Pessimistic, 'active_record/locking/pessimistic' -- cgit v1.2.3 From 27670363926ee341078aa69ae27204d7338037f5 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Mon, 19 Oct 2009 19:00:48 -0700 Subject: Use bundled env for tests only --- activerecord/lib/active_record.rb | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 8f118a6057..88becfb482 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -21,16 +21,11 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #++ -bundled = "#{File.dirname(__FILE__)}/../vendor/gems/environment" -if File.exist?("#{bundled}.rb") - require bundled -else - activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" - $:.unshift(activesupport_path) if File.directory?(activesupport_path) +activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" +$:.unshift(activesupport_path) if File.directory?(activesupport_path) - activemodel_path = "#{File.dirname(__FILE__)}/../../activemodel/lib" - $:.unshift(activemodel_path) if File.directory?(activemodel_path) -end +activemodel_path = "#{File.dirname(__FILE__)}/../../activemodel/lib" +$:.unshift(activemodel_path) if File.directory?(activemodel_path) require 'active_support' require 'active_model' -- cgit v1.2.3 From e714b499cc1f7ebc84f8d0e96607b79e60f2828d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Valim?= Date: Tue, 20 Oct 2009 22:20:01 -0200 Subject: Move validator, human_name and human_attribute_name to ActiveModel, remove deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche --- activerecord/lib/active_record.rb | 1 - 1 file changed, 1 deletion(-) (limited to 'activerecord/lib/active_record.rb') diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 88becfb482..8195e78826 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -71,7 +71,6 @@ module ActiveRecord autoload :Timestamp, 'active_record/timestamp' autoload :Transactions, 'active_record/transactions' autoload :Types, 'active_record/types' - autoload :Validator, 'active_record/validator' autoload :Validations, 'active_record/validations' module AttributeMethods -- cgit v1.2.3