mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Check to see if the plugin object responds to load_tasks (vendor/plugin/* does not yet) Fixes Sam Ruby's tests.
This commit is contained in:
@@ -73,7 +73,10 @@ module Rails
|
||||
def load_tasks
|
||||
require "rails/tasks"
|
||||
# Load all extension rake tasks
|
||||
plugins.each(&:load_tasks)
|
||||
# TODO: Make all plugin objects respond to :load_tasks
|
||||
plugins.each do |plugin|
|
||||
plugin.load_tasks if plugin.respond_to? :load_tasks
|
||||
end
|
||||
# Load all plugin tasks
|
||||
Dir["#{root}/vendor/plugins/*/**/tasks/**/*.rake"].sort.each { |ext| load ext }
|
||||
# Load all application tasks
|
||||
|
||||
Reference in New Issue
Block a user