Permalink
Browse files

Check to see if the plugin object responds to load_tasks (vendor/plug…

…in/* does not yet) Fixes Sam Ruby's tests.
  • Loading branch information...
1 parent 0dea509 commit aa1b32ae9774e3f2a95faa0ec9efdf295958106d Carl Lerche committed Dec 29, 2009
Showing with 4 additions and 1 deletion.
  1. +4 −1 railties/lib/rails/application.rb
@@ -73,7 +73,10 @@ def reload_routes!
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

1 comment on commit aa1b32a

Contributor

spohlenz commented on aa1b32a Dec 29, 2009

Please take a look at issues 3623 and 3621 which solve the core problem that this commit is trying to resolve.

Please sign in to comment.