Permalink
Browse files

support for older version of activesupport

  • Loading branch information...
maccman committed Jul 20, 2010
1 parent 16512ee commit 107383c6c375d61035ce139fd9f30f311d68f660
Showing with 8 additions and 2 deletions.
  1. +8 −2 lib/bowline/initializer.rb
View
@@ -110,8 +110,14 @@ def load_gems
# Set the paths from which Bowline will automatically load source files, and
# the load_once paths.
def set_autoload_paths
- ActiveSupport::Dependencies.autoload_paths = configuration.autoload_paths.uniq
- ActiveSupport::Dependencies.autoload_once_paths = configuration.autoload_once_paths.uniq
+ # Rails 3 master support
+ if ActiveSupport::Dependencies.respond_to?(:autoload_paths)
+ ActiveSupport::Dependencies.autoload_paths = configuration.autoload_paths.uniq
+ ActiveSupport::Dependencies.autoload_once_paths = configuration.autoload_once_paths.uniq
+ else
+ ActiveSupport::Dependencies.load_paths = configuration.autoload_paths.uniq
+ ActiveSupport::Dependencies.load_once_paths = configuration.autoload_once_paths.uniq
+ end
end
def add_plugin_load_paths

0 comments on commit 107383c

Please sign in to comment.