diff options
Diffstat (limited to 'activerecord/lib/active_record.rb')
-rw-r--r-- | activerecord/lib/active_record.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb index 81fe921fd8..36adc7b6f2 100644 --- a/activerecord/lib/active_record.rb +++ b/activerecord/lib/active_record.rb @@ -25,9 +25,17 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' -$:.unshift(File.dirname(__FILE__) + '/../../arel/lib') +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' +end + module ActiveRecord # TODO: Review explicit loads to see if they will automatically be handled by the initilizer. def self.load_all! |