Browse files

Fix for ActiveSupport 3.0

Resolves crafterm/sprinkle#4
  • Loading branch information...
1 parent 794ff31 commit a46423dcac621deb60c74b88f2c9bf3da12cb741 @bsears bsears committed Sep 29, 2010
Showing with 7 additions and 1 deletion.
  1. +7 −1 lib/sprinkle.rb
View
8 lib/sprinkle.rb
@@ -2,7 +2,13 @@
require 'active_support'
# Use active supports auto load mechanism
-ActiveSupport::Dependencies.load_paths << File.dirname(__FILE__)
+require 'active_support/version'
+if ActiveSupport::VERSION::MAJOR > 2
+ require 'active_support/dependencies'
+ ActiveSupport::Dependencies.autoload_paths << File.dirname(__FILE__)
+else
+ ActiveSupport::Dependencies.load_paths << File.dirname(__FILE__)
+end
# Configure active support to log auto-loading of dependencies
#ActiveSupport::Dependencies::RAILS_DEFAULT_LOGGER = Logger.new($stdout)

0 comments on commit a46423d

Please sign in to comment.