diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-06-09 10:29:55 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-06-09 10:29:55 -0300 |
commit | 103b282130dd340143654801430aed787da4c9c6 (patch) | |
tree | eddbe800d02f1a3c23f6266b808e74656af31f82 /activeresource/lib/active_resource.rb | |
parent | fd3c55f09fdfb45c33a5383af2c0b9ddf8f63e90 (diff) | |
parent | a94e7d7897a300a95d5d5a00c5efc573b42bcb58 (diff) | |
download | rails-103b282130dd340143654801430aed787da4c9c6.tar.gz rails-103b282130dd340143654801430aed787da4c9c6.tar.bz2 rails-103b282130dd340143654801430aed787da4c9c6.zip |
Merge commit 'rails/master'
Diffstat (limited to 'activeresource/lib/active_resource.rb')
-rw-r--r-- | activeresource/lib/active_resource.rb | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/activeresource/lib/active_resource.rb b/activeresource/lib/active_resource.rb index b46801affc..1dcb795a7d 100644 --- a/activeresource/lib/active_resource.rb +++ b/activeresource/lib/active_resource.rb @@ -25,18 +25,15 @@ activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib" $:.unshift(activesupport_path) if File.directory?(activesupport_path) require 'active_support' -begin - require 'active_model' -rescue LoadError - $:.unshift "#{File.dirname(__FILE__)}/../../activemodel/lib" - require 'active_model' -end - -require 'active_resource/formats' -require 'active_resource/base' -require 'active_resource/validations' -require 'active_resource/custom_methods' +activemodel_path = "#{File.dirname(__FILE__)}/../../activemodel/lib" +$:.unshift(activemodel_path) if File.directory?(activemodel_path) +require 'active_model' module ActiveResource autoload :Base, 'active_resource/base' + autoload :Connection, 'active_resource/connection' + autoload :CustomMethods, 'active_resource/custom_methods' + autoload :Formats, 'active_resource/formats' + autoload :Validations, 'active_resource/validations' + autoload :HttpMock, 'active_resource/http_mock' end |