Permalink
Browse files

resolving conflict

  • Loading branch information...
2 parents 43c8492 + 7450046 commit 6f59a65e201a6a463d1a7b9b761cdc66bb8b928c @PRXci PRXci committed Oct 6, 2010
Showing with 17 additions and 6 deletions.
  1. +2 −1 .gitignore
  2. +1 −1 Gemfile
  3. +13 −3 lib/apn_on_rails/apn_on_rails.rb
  4. +1 −1 spec/active_record/setup_ar.rb
View
@@ -12,4 +12,5 @@ build/*
*.mode1v3
.svn
profile
-spec/active_record/test.db
+spec/active_record/test.db
+.bundle
View
@@ -14,5 +14,5 @@ group :development do
gem "jeweler", "~> 1.5.0.pre2"
gem "rcov", ">= 0"
gem "actionpack", '~> 2.3.8'
- gem 'activerecord', "~> 2.3.8"
+ gem 'activerecord', "~> 2.3.8", :require => 'active_record'
end
@@ -66,6 +66,16 @@ def initialize
path = File.join(File.dirname(__FILE__), 'app', dir)
$LOAD_PATH << path
# puts "Adding #{path}"
- ActiveSupport::Dependencies.load_paths << path
- ActiveSupport::Dependencies.load_once_paths.delete(path)
-end
+ begin
+ if ActiveSupport::Dependencies.respond_to? :autoload_paths
+ ActiveSupport::Dependencies.autoload_paths << path
+ ActiveSupport::Dependencies.autoload_once_paths.delete(path)
+ else
+ ActiveSupport::Dependencies.load_paths << path
+ ActiveSupport::Dependencies.load_once_paths.delete(path)
+ end
+ rescue NameError
+ Dependencies.load_paths << path
+ Dependencies.load_once_paths.delete(path)
+ end
+end
@@ -1,5 +1,5 @@
require 'rubygems'
-require 'activerecord'
+require 'active_record'
logger = Logger.new(STDOUT)
logger.level = Logger::INFO

0 comments on commit 6f59a65

Please sign in to comment.