Browse files

Plugins dropped in the plugins/ directory are auto-loaded.

  • Loading branch information...
1 parent 642d0b3 commit eb0bd4e3309824cc049c599174eccac488cdcd8c @seven1m seven1m committed Nov 26, 2010
Showing with 6 additions and 4 deletions.
  1. +4 −4 config/application.rb
  2. +2 −0 plugins/.gitignore
View
8 config/application.rb
@@ -6,15 +6,15 @@
# you've limited to :test, :development, or :production.
Bundler.require(:default, Rails.env) if defined?(Bundler)
+Dir[File.dirname(__FILE__) + '/../plugins/**/lib/*'].each do |plugin|
+ require plugin.sub(/\.rb$/, '')
+end
+
module OneBody
class Application < Rails::Application
# Custom directories with classes and modules you want to be autoloadable.
config.autoload_paths << "#{config.root}/app/sweepers"
- # Custom directory for plugins
- # FIXME
- #config.plugin_paths << "#{config.root}/plugins"
-
# Cache store location
config.action_controller.cache_store = [:file_store, "#{config.root}/cache"]
View
2 plugins/.gitignore
@@ -0,0 +1,2 @@
+*
+!.gitignore

0 comments on commit eb0bd4e

Please sign in to comment.