aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/tasks')
-rw-r--r--railties/lib/rails/tasks/middleware.rake2
-rw-r--r--railties/lib/rails/tasks/routes.rake2
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails/tasks/middleware.rake b/railties/lib/rails/tasks/middleware.rake
index e670989345..cd35ffb19a 100644
--- a/railties/lib/rails/tasks/middleware.rake
+++ b/railties/lib/rails/tasks/middleware.rake
@@ -3,5 +3,5 @@ task :middleware => :environment do
Rails.configuration.middleware.each do |middleware|
puts "use #{middleware.inspect}"
end
- puts "run #{Rails::Application.instance.class.name}.routes"
+ puts "run #{Rails.application.class.name}.routes"
end
diff --git a/railties/lib/rails/tasks/routes.rake b/railties/lib/rails/tasks/routes.rake
index 41619bc1f8..a99232c4be 100644
--- a/railties/lib/rails/tasks/routes.rake
+++ b/railties/lib/rails/tasks/routes.rake
@@ -1,6 +1,6 @@
desc 'Print out all defined routes in match order, with names. Target specific controller with CONTROLLER=x.'
task :routes => :environment do
- Rails::Application.reload_routes!
+ Rails.application.reload_routes!
all_routes = ENV['CONTROLLER'] ? Rails.application.routes.routes.select { |route| route.defaults[:controller] == ENV['CONTROLLER'] } : Rails.application.routes.routes
routes = all_routes.collect do |route|
# TODO: The :index method is deprecated in 1.9 in favor of :key