1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05: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:
Carl Lerche 2009-12-29 10:49:01 -08:00
parent 0dea509817
commit aa1b32ae97

View file

@ -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