diff options
author | Sam Pohlenz <sam@sampohlenz.com> | 2009-12-28 08:48:07 +1030 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-12-29 14:47:48 -0800 |
commit | 468bdb3ed8ee20fe4215e62f0f27513c70e2398c (patch) | |
tree | 7cc40ecfaa65f0d6acd701dc66a5ff10145b4b9a /railties/lib/rails/plugin.rb | |
parent | cbce027669ded4e951af3124cae23d6707357aea (diff) | |
download | rails-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.rb | 4 |
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 |