Permalink
Browse files

Make autoload path injection compatible with older Rails versions

  • Loading branch information...
1 parent 954b023 commit 0d4f0d1148e07c4d34b2602193c37eb2ff57bd0c @be9 be9 committed with Sep 6, 2010
Showing with 6 additions and 1 deletion.
  1. +6 −1 rails/init.rb
View
@@ -1,2 +1,7 @@
require File.join(File.dirname(__FILE__), *%w[.. lib viewtastic])
-ActiveSupport::Dependencies.autoload_paths << File.join(Rails.root, *%w[app presenters])
+
+if Rails.version >= '2.3.9'
+ ActiveSupport::Dependencies.autoload_paths
+else
+ ActiveSupport::Dependencies.load_paths
+end << File.join(Rails.root, *%w[app presenters])

0 comments on commit 0d4f0d1

Please sign in to comment.