aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/application.rb')
-rw-r--r--railties/lib/rails/application.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb
index cd579a1c0d..d714c5ac41 100644
--- a/railties/lib/rails/application.rb
+++ b/railties/lib/rails/application.rb
@@ -72,7 +72,9 @@ module Rails
def load_tasks
require "rails/tasks"
- Dir["#{root}/vendor/plugins/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
+ plugins.each { |p| p.load_tasks }
+ # Load all application tasks
+ # TODO: extract out the path to the rake tasks
Dir["#{root}/lib/tasks/**/*.rake"].sort.each { |ext| load ext }
task :environment do
$rails_rake_task = true
@@ -90,7 +92,7 @@ module Rails
def plugins
@plugins ||= begin
plugin_names = config.plugins || [:all]
- Plugin.plugins.select { |p| plugin_names.include?(:all) || plugin_names.include?(p.plugin_name) } +
+ Plugin.plugins.select { |p| plugin_names.include?(:all) || plugin_names.include?(p.plugin_name) }.map { |p| p.new } +
Plugin::Vendored.all(config.plugins || [:all], config.paths.vendor.plugins)
end
end