aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorJeremy Kemper <jeremy@bitsweat.net>2009-05-02 15:16:12 -0700
committerJeremy Kemper <jeremy@bitsweat.net>2009-05-02 15:16:12 -0700
commit945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8 (patch)
tree59d1701b9df7476ac4ab4ec6e604100a99296311 /activerecord
parent3be3470fab788856b4559742434f195cc6b1009a (diff)
downloadrails-945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8.tar.gz
rails-945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8.tar.bz2
rails-945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8.zip
Check for sibling Active Support first
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record.rb11
1 files changed, 3 insertions, 8 deletions
diff --git a/activerecord/lib/active_record.rb b/activerecord/lib/active_record.rb
index 500a90d6cb..1982ffc791 100644
--- a/activerecord/lib/active_record.rb
+++ b/activerecord/lib/active_record.rb
@@ -21,15 +21,10 @@
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
#++
-begin
- require 'active_support'
-rescue LoadError
- activesupport_path = "#{File.dirname(__FILE__)}/../../activesupport/lib"
- if File.directory?(activesupport_path)
- $:.unshift activesupport_path
- require 'active_support'
- end
+"#{File.dirname(__FILE__)}/../../activesupport/lib".tap do |path|
+ $:.unshift(path) if File.directory?(path)
end
+require 'active_support'
require 'active_support/core/all'
module ActiveRecord