aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/plugin.rb
diff options
context:
space:
mode:
authorSam Pohlenz <sam@sampohlenz.com>2009-12-28 08:48:07 +1030
committerCarl Lerche <carllerche@mac.com>2009-12-29 14:47:48 -0800
commit468bdb3ed8ee20fe4215e62f0f27513c70e2398c (patch)
tree7cc40ecfaa65f0d6acd701dc66a5ff10145b4b9a /railties/lib/rails/plugin.rb
parentcbce027669ded4e951af3124cae23d6707357aea (diff)
downloadrails-468bdb3ed8ee20fe4215e62f0f27513c70e2398c.tar.gz
rails-468bdb3ed8ee20fe4215e62f0f27513c70e2398c.tar.bz2
rails-468bdb3ed8ee20fe4215e62f0f27513c70e2398c.zip
Make plugins responsible for loading their own rake tasks
Signed-off-by: Carl Lerche <carllerche@mac.com>
Diffstat (limited to 'railties/lib/rails/plugin.rb')
-rw-r--r--railties/lib/rails/plugin.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/railties/lib/rails/plugin.rb b/railties/lib/rails/plugin.rb
index b5e6953fef..c64042cf7d 100644
--- a/railties/lib/rails/plugin.rb
+++ b/railties/lib/rails/plugin.rb
@@ -85,6 +85,10 @@ module Rails
Dir["#{path}/{lib}", "#{path}/app/{models,controllers,helpers}"]
end
+ def load_tasks
+ Dir["#{path}/**/tasks/**/*.rake"].sort.each { |ext| load ext }
+ end
+
initializer :add_to_load_path, :after => :set_autoload_paths do |app|
load_paths.each do |path|
$LOAD_PATH << path