Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Make Rake::DSL methods available within Railtie rake_tasks block

Fixes incompatibility introduced by Rake 0.9.0
  • Loading branch information...
commit 83f257fc4862642af29056cb5b7dfef6e1303754 1 parent a37ae63
Patrick Quinn bilts authored tenderlove committed
10 railties/lib/rails/application.rb
View
@@ -211,10 +211,12 @@ def default_middleware_stack
end
def initialize_tasks
- require "rails/tasks"
- task :environment do
- $rails_rake_task = true
- require_environment!
+ self.class.rake_tasks do
+ require "rails/tasks"
+ task :environment do
+ $rails_rake_task = true
+ require_environment!
+ end
end
end
1  railties/lib/rails/railtie.rb
View
@@ -181,6 +181,7 @@ def load_console
end
def load_tasks
+ extend Rake::DSL if defined? Rake::DSL
self.class.rake_tasks.each(&:call)
end

1 comment on commit 83f257f

Erik Michaels-Ober

:+1: Nice one! Congratulations on your first commit in Rails.

Please sign in to comment.
Something went wrong with that request. Please try again.