Permalink
Browse files

tweaked for compatibility with Rails 2.1.0

  • Loading branch information...
anthonymoralez authored and markbates committed Jan 31, 2010
1 parent f727cd2 commit ae314f5faa18c7a8784574acd89d2c5bca7f6491
Showing with 6 additions and 1 deletion.
  1. +6 −1 lib/apn_on_rails/apn_on_rails.rb
@@ -57,6 +57,11 @@ def initialize(message) # :nodoc:
path = File.join(File.dirname(__FILE__), 'app', dir)
$LOAD_PATH << path
# puts "Adding #{path}"
+ begin
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

0 comments on commit ae314f5

Please sign in to comment.