diff options
Diffstat (limited to 'activerecord/lib/active_record.rb')
-rw-r--r-- | activerecord/lib/active_record.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 2f1e7573d8..d9310a9927 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -25,11 +25,15 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' +arel_path = "#{File.dirname(__FILE__)}/../../arel/lib" +$:.unshift(arel_path) if File.directory?(arel_path) +require 'arel' + begin require 'active_model' rescue LoadError $:.unshift "#{File.dirname(__FILE__)}/../../activemodel/lib" - require 'active_model' + require 'active_model' end module ActiveRecord @@ -48,6 +52,7 @@ module ActiveRecord autoload :Associations, 'active_record/associations' autoload :AttributeMethods, 'active_record/attribute_methods' autoload :AutosaveAssociation, 'active_record/autosave_association' + autoload :Relation, 'active_record/relation' autoload :Base, 'active_record/base' autoload :Batches, 'active_record/batches' autoload :Calculations, 'active_record/calculations' @@ -92,4 +97,5 @@ module ActiveRecord end end +Arel::Table.engine = Arel::Sql::Engine.new(ActiveRecord::Base) I18n.load_path << File.dirname(__FILE__) + '/active_record/locale/en.yml' |