Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #1174 from bilts/fix-rake-dsl

Make Rake::DSL methods available within Railtie rake_tasks block (so we're compatible with Rake 0.9.0).
  • Loading branch information...
commit 8b719cf3f73cbce78506e3a42ed01b2c4314a70a 2 parents da8469f + e290835
David Heinemeier Hansson dhh authored
10 railties/lib/rails/application.rb
View
@@ -185,10 +185,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
@@ -178,6 +178,7 @@ def load_console(sandbox=false)
end
def load_tasks
+ extend Rake::DSL if defined? Rake::DSL
self.class.rake_tasks.each(&:call)
# load also tasks from all superclasses
Please sign in to comment.
Something went wrong with that request. Please try again.