Skip to content
Browse files

Check for sibling Active Support first

  • Loading branch information...
1 parent 3be3470 commit 945bf9c254b5bfb56df874c1a3f7f0f1e89dc8b8 @jeremy jeremy committed
Showing with 3 additions and 8 deletions.
  1. +3 −8 activerecord/lib/active_record.rb
View
11 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

0 comments on commit 945bf9c

Please sign in to comment.
Something went wrong with that request. Please try again.